From e1e87450b773727bf2ed1a92ed5fe30d65c65e8a Mon Sep 17 00:00:00 2001 From: Eshan Roy Date: Tue, 26 Nov 2024 10:05:28 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=5Fpath):=20fix=20relative?= =?UTF-8?q?=20to=20absolute=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Kernel.py | 2 +- libs/functions.py | 2 +- snigdhaos-kernel-switcher.py | 22 +++++++++++++++++++--- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/libs/Kernel.py b/libs/Kernel.py index 2d1fe5b..ccf0f42 100644 --- a/libs/Kernel.py +++ b/libs/Kernel.py @@ -1,4 +1,4 @@ -#!/bin/python +#!/usr/bin/python import datetime from datetime import datetime diff --git a/libs/functions.py b/libs/functions.py index 55b73a2..ec072d7 100644 --- a/libs/functions.py +++ b/libs/functions.py @@ -1,4 +1,4 @@ -#!/bin/python +#!/usr/bin/python import os from os import makedirs diff --git a/snigdhaos-kernel-switcher.py b/snigdhaos-kernel-switcher.py index ca9cc92..c28ff2d 100644 --- a/snigdhaos-kernel-switcher.py +++ b/snigdhaos-kernel-switcher.py @@ -1,7 +1,23 @@ -#!/bin/python +#!/usr/bin/python import os - +import libs.functions as fn import gi -gi.require_version("Gtk", "3.0") +gi.require_version("Gtk", "4.0") from gi.repository import Gtk, Gio, GLib, Gdk +base_dir = fn.os.path.dirname(fn.os.path.realpath(__file__)) + +app_name = "Snigdha OS Kernel Switcher" +app_version = "${app_version}" +app_name_dir = "snigdhaos-kernel-switcher" +app_id = "org.snigdhaos.kernelswitcher" +lock_file = "/tmp/.sks.lock" +progress_lock_file = "/tmp/.sks-progress.lock" +pid_file ="/tmp/.sks.pid" + +class Main(Gtk.Application): + def __init__(self): + super().__init__(application_id=app_id, flags=Gio.ApplicationFlags.FLAGS_NONE) + + def do_activate(self): + default_context = GLib. \ No newline at end of file