commit
This commit is contained in:
parent
8e00688931
commit
3594211fe8
@ -26,25 +26,41 @@ class Application:
|
|||||||
|
|
||||||
settings = Gio.Settings.new("org.nobara.layouts")
|
settings = Gio.Settings.new("org.nobara.layouts")
|
||||||
|
|
||||||
print(settings.get_int("layout-num"))
|
|
||||||
|
|
||||||
|
|
||||||
win10toggle = self.builder.get_object("win10_button")
|
if settings.get_int("layout-num") == 1:
|
||||||
|
win10toggle = self.builder.get_object("win10_button")
|
||||||
|
win10toggle.set_active(True)
|
||||||
|
|
||||||
win10toggle.set_active(True)
|
if settings.get_int("layout-num") == 2:
|
||||||
win10toggle.pressed()
|
win11toggle = self.builder.get_object("win11_button")
|
||||||
|
win11toggle.set_active(True)
|
||||||
|
|
||||||
|
if settings.get_int("layout-num") == 3:
|
||||||
|
gnometoggle = self.builder.get_object("gnome_button")
|
||||||
|
gnometoggle.set_active(True)
|
||||||
|
|
||||||
|
if settings.get_int("layout-num") == 4:
|
||||||
|
macostoggle = self.builder.get_object("macos_button")
|
||||||
|
macostoggle.set_active(True)
|
||||||
### Layouts ###
|
### Layouts ###
|
||||||
|
|
||||||
def on_win10_button_pressed(self, widget):
|
def on_win10_button_pressed(self, widget):
|
||||||
settings = Gio.Settings.new("org.nobara.layouts")
|
settings = Gio.Settings.new("org.nobara.layouts")
|
||||||
settings.set_int("layout-num", 1)
|
settings.set_int("layout-num", 1)
|
||||||
def test2(self, widget):
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/layout-scripts/win10.sh"], shell=True)
|
||||||
print("test2")
|
def on_win11_button_pressed(self, widget):
|
||||||
def test3(self, widget):
|
settings = Gio.Settings.new("org.nobara.layouts")
|
||||||
print("test3")
|
settings.set_int("layout-num", 2)
|
||||||
def test4(self, widget):
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/layout-scripts/win11.sh"], shell=True)
|
||||||
print("test4")
|
def on_gnome_button_pressed(self, widget):
|
||||||
|
settings = Gio.Settings.new("org.nobara.layouts")
|
||||||
|
settings.set_int("layout-num", 3)
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/layout-scripts/reset.sh"], shell=True)
|
||||||
|
def on_macos_button_pressed(self, widget):
|
||||||
|
settings = Gio.Settings.new("org.nobara.layouts")
|
||||||
|
settings.set_int("layout-num", 4)
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/layout-scripts/macos.sh"], shell=True)
|
||||||
|
|
||||||
### Settings ###
|
### Settings ###
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user