From 055d57ef2752aad1b72c9c0de5f23d3711519348 Mon Sep 17 00:00:00 2001 From: Ward Nakchbandi Date: Sat, 24 Sep 2022 00:32:49 +0300 Subject: [PATCH] commit --- .../scripts/nobara-layouts/nobara-layouts.py | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/etc/nobara/scripts/nobara-layouts/nobara-layouts.py b/src/etc/nobara/scripts/nobara-layouts/nobara-layouts.py index 3b773d9..34c2d23 100644 --- a/src/etc/nobara/scripts/nobara-layouts/nobara-layouts.py +++ b/src/etc/nobara/scripts/nobara-layouts/nobara-layouts.py @@ -62,5 +62,59 @@ class Application: if switch.get_active() == True : subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/desktop.sh"], shell=True) + #### Audio Switch #### + + audio_switch = self.builder.get_object("audio_switch") + + audio_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep volume-mixer@evermiss.net"], shell=True) + + if (audio_output.returncode) == 0: + audio_switch.set_active(True) + + def on_audio_switch_active_notify(self, switch, state): + if switch.get_active() == True : + subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/audio.sh"], shell=True) + + #### Blur Switch #### + + blur_switch = self.builder.get_object("blur_switch") + + blur_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep blur-my-shell@aunetx"], shell=True) + + if (blur_output.returncode) == 0: + blur_switch.set_active(True) + + def on_blur_switch_active_notify(self, switch, state): + if switch.get_active() == True : + subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/blur.sh"], shell=True) + + #### Tray Switch #### + + tray_switch = self.builder.get_object("tray_switch") + + tray_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep trayIconsReloaded@selfmade.pl"], shell=True) + + if (tray_output.returncode) == 0: + tray_switch.set_active(True) + + def on_tray_switch_active_notify(self, switch, state): + if switch.get_active() == True : + subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/tray.sh"], shell=True) + + #### workspace Switch #### + + workspace_switch = self.builder.get_object("workspace_switch") + + workspace_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep auto-move-windows@gnome-shell-extensions.gcampax.github.com"], shell=True) + + if (workspace_output.returncode) == 0: + workspace_switch.set_active(True) + + def on_workspace_switch_active_notify(self, switch, state): + if switch.get_active() == True : + subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/workspace.sh"], shell=True) + + + Application() Gtk.main()