commit
This commit is contained in:
parent
1440f7ac1d
commit
727af158ae
185
src/etc/nobara/scripts/nobara-layouts/.goutputstream-59TLS1
Normal file
185
src/etc/nobara/scripts/nobara-layouts/.goutputstream-59TLS1
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
#### 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)
|
||||||
|
return 0
|
||||||
|
#### 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)
|
||||||
|
return 0
|
||||||
|
#### 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)
|
||||||
|
return 0
|
||||||
|
#### 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)
|
||||||
|
return 0
|
||||||
|
#### x11 Switch ####
|
||||||
|
|
||||||
|
x11_switch = self.builder.get_object("x11_switch")
|
||||||
|
|
||||||
|
x11_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep x11gestures@joseexposito.github.io"], shell=True)
|
||||||
|
|
||||||
|
if (x11_output.returncode) == 0:
|
||||||
|
x11_switch.set_active(True)
|
||||||
|
|
||||||
|
def on_x11_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True :
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/x11.sh"], shell=True)
|
||||||
|
return 0
|
||||||
|
#### clipboard Switch ####
|
||||||
|
|
||||||
|
clipboard_switch = self.builder.get_object("clipboard_switch")
|
||||||
|
|
||||||
|
clipboard_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep gnome-clipboard@b00f.github.io"], shell=True)
|
||||||
|
|
||||||
|
if (clipboard_output.returncode) == 0:
|
||||||
|
clipboard_switch.set_active(True)
|
||||||
|
|
||||||
|
def on_clipboard_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True :
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/clipboard.sh"], shell=True)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
#### caffeine Switch ####
|
||||||
|
|
||||||
|
caffeine_switch = self.builder.get_object("caffeine_switch")
|
||||||
|
|
||||||
|
caffeine_output = subprocess.run(
|
||||||
|
["gsettings get org.gnome.shell enabled-extensions | grep espresso@coadmunkee.github.com"], shell=True)
|
||||||
|
|
||||||
|
if (caffeine_output.returncode) == 0:
|
||||||
|
caffeine_switch.set_active(True)
|
||||||
|
|
||||||
|
def on_caffeine_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/caffeine.sh"], shell=True)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
#### supergfxctl Switch ####
|
||||||
|
|
||||||
|
supergfxctl_switch = self.builder.get_object("supergfxctl_switch")
|
||||||
|
|
||||||
|
supergfxctl_output = subprocess.run(
|
||||||
|
["gsettings get org.gnome.shell enabled-extensions | grep supergfxctl-gex@asus-linux.org"], shell=True)
|
||||||
|
|
||||||
|
if (supergfxctl_output.returncode) == 0:
|
||||||
|
supergfxctl_switch.set_active(True)
|
||||||
|
|
||||||
|
def on_supergfxctl_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/supergfxctl.sh"], shell=True)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
#### kde Switch ####
|
||||||
|
|
||||||
|
kde_switch = self.builder.get_object("kde_switch")
|
||||||
|
|
||||||
|
kde_output = subprocess.run(
|
||||||
|
["gsettings get org.gnome.shell enabled-extensions | grep gsconnect@andyholmes.github.io"], shell=True)
|
||||||
|
|
||||||
|
if (kde_output.returncode) == 0:
|
||||||
|
kde_switch.set_active(True)
|
||||||
|
|
||||||
|
def on_kde_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/kde.sh"], shell=True)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
#### weather Switch ####
|
||||||
|
|
||||||
|
weather_switch = self.builder.get_object("weather_switch")
|
||||||
|
|
||||||
|
weather_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep openweather-extension@jenslody.de"], shell=True)
|
||||||
|
|
||||||
|
if (weather_output.returncode) == 0:
|
||||||
|
weather_switch.set_active(True)
|
||||||
|
|
||||||
|
def on_weather_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/weather.sh"], shell=True)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
#### spacebar Switch ####
|
||||||
|
|
||||||
|
spacebar_switch = self.builder.get_object("spacebar_switch")
|
||||||
|
|
||||||
|
spacebar_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep space-bar@luchrioh"], shell=True)
|
||||||
|
|
||||||
|
if (spacebar_output.returncode) == 0:
|
||||||
|
spacebar_switch.set_active(True)
|
||||||
|
|
||||||
|
def on_spacebar_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/spacebar.sh"], shell=True)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
#### stats Switch ####
|
||||||
|
|
||||||
|
stats_switch = self.builder.get_object("stats_switch")
|
||||||
|
|
||||||
|
stats_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep Vitals@CoreCoding.com"], shell=True)
|
||||||
|
|
||||||
|
if (stats_output.returncode) == 0:
|
||||||
|
stats_switch.set_active(True)
|
||||||
|
|
||||||
|
|
||||||
|
def on_stats_switch_active_notify(self, switch, state):
|
||||||
|
if stats_switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/stats.sh"], shell=True)
|
||||||
|
else:
|
||||||
|
print("test")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
#### hid Switch ####
|
||||||
|
|
||||||
|
hid_switch = self.builder.get_object("hid_switch")
|
||||||
|
|
||||||
|
hid_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep wireless-hid@chlumskyvaclav.gmail.com"], shell=True)
|
||||||
|
|
||||||
|
if (hid_output.returncode) == 0:
|
||||||
|
hid_switch.set_active(True)
|
||||||
|
|
||||||
|
def on_hid_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/hid.sh"], shell=True)
|
||||||
|
return 0
|
||||||
|
|
@ -47,201 +47,158 @@ class Application:
|
|||||||
print("test4")
|
print("test4")
|
||||||
|
|
||||||
### Settings ###
|
### Settings ###
|
||||||
|
|
||||||
#### Desktop Switch ####
|
|
||||||
|
|
||||||
desktop_switch = self.builder.get_object("desktop_switch")
|
desktop_switch = self.builder.get_object("desktop_switch")
|
||||||
|
|
||||||
desktop_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep ding@rastersoft.com"], shell=True)
|
desktop_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep ding@rastersoft.com"], shell=True)
|
||||||
|
|
||||||
if (desktop_output.returncode) == 0:
|
if (desktop_output.returncode) == 0:
|
||||||
desktop_switch.set_active(True)
|
desktop_switch.set_active(True)
|
||||||
|
|
||||||
def on_desktop_switch_active_notify(self, switch, state):
|
|
||||||
if switch.get_active() == True :
|
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/desktop.sh"], shell=True)
|
|
||||||
return 0
|
|
||||||
#### Audio Switch ####
|
|
||||||
|
|
||||||
audio_switch = self.builder.get_object("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)
|
audio_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep volume-mixer@evermiss.net"], shell=True)
|
||||||
|
|
||||||
if (audio_output.returncode) == 0:
|
if (audio_output.returncode) == 0:
|
||||||
audio_switch.set_active(True)
|
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)
|
|
||||||
return 0
|
|
||||||
#### Blur Switch ####
|
|
||||||
|
|
||||||
blur_switch = self.builder.get_object("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)
|
blur_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep blur-my-shell@aunetx"], shell=True)
|
||||||
|
|
||||||
if (blur_output.returncode) == 0:
|
if (blur_output.returncode) == 0:
|
||||||
blur_switch.set_active(True)
|
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)
|
|
||||||
return 0
|
|
||||||
#### Tray Switch ####
|
|
||||||
|
|
||||||
tray_switch = self.builder.get_object("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)
|
tray_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep trayIconsReloaded@selfmade.pl"], shell=True)
|
||||||
|
|
||||||
if (tray_output.returncode) == 0:
|
if (tray_output.returncode) == 0:
|
||||||
tray_switch.set_active(True)
|
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)
|
|
||||||
return 0
|
|
||||||
#### workspace Switch ####
|
|
||||||
|
|
||||||
workspace_switch = self.builder.get_object("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)
|
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:
|
if (workspace_output.returncode) == 0:
|
||||||
workspace_switch.set_active(True)
|
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)
|
|
||||||
return 0
|
|
||||||
#### x11 Switch ####
|
|
||||||
|
|
||||||
x11_switch = self.builder.get_object("x11_switch")
|
x11_switch = self.builder.get_object("x11_switch")
|
||||||
|
|
||||||
x11_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep x11gestures@joseexposito.github.io"], shell=True)
|
x11_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep x11gestures@joseexposito.github.io"], shell=True)
|
||||||
|
|
||||||
if (x11_output.returncode) == 0:
|
if (x11_output.returncode) == 0:
|
||||||
x11_switch.set_active(True)
|
x11_switch.set_active(True)
|
||||||
|
|
||||||
def on_x11_switch_active_notify(self, switch, state):
|
|
||||||
if switch.get_active() == True :
|
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/x11.sh"], shell=True)
|
|
||||||
return 0
|
|
||||||
#### clipboard Switch ####
|
|
||||||
|
|
||||||
|
|
||||||
clipboard_switch = self.builder.get_object("clipboard_switch")
|
clipboard_switch = self.builder.get_object("clipboard_switch")
|
||||||
|
|
||||||
clipboard_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep gnome-clipboard@b00f.github.io"], shell=True)
|
clipboard_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep gnome-clipboard@b00f.github.io"], shell=True)
|
||||||
|
|
||||||
if (clipboard_output.returncode) == 0:
|
if (clipboard_output.returncode) == 0:
|
||||||
clipboard_switch.set_active(True)
|
clipboard_switch.set_active(True)
|
||||||
|
|
||||||
def on_clipboard_switch_active_notify(self, switch, state):
|
supergfxctl_switch = self.builder.get_object("supergfxctl_switch")
|
||||||
if switch.get_active() == True :
|
supergfxctl_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep supergfxctl-gex@asus-linux.org"], shell=True)
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/clipboard.sh"], shell=True)
|
if (supergfxctl_output.returncode) == 0:
|
||||||
return 0
|
supergfxctl_switch.set_active(True)
|
||||||
|
|
||||||
#### caffeine Switch ####
|
|
||||||
|
|
||||||
caffeine_switch = self.builder.get_object("caffeine_switch")
|
caffeine_switch = self.builder.get_object("caffeine_switch")
|
||||||
|
caffeine_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep espresso@coadmunkee.github.com"], shell=True)
|
||||||
caffeine_output = subprocess.run(
|
|
||||||
["gsettings get org.gnome.shell enabled-extensions | grep espresso@coadmunkee.github.com"], shell=True)
|
|
||||||
|
|
||||||
if (caffeine_output.returncode) == 0:
|
if (caffeine_output.returncode) == 0:
|
||||||
caffeine_switch.set_active(True)
|
caffeine_switch.set_active(True)
|
||||||
|
|
||||||
def on_caffeine_switch_active_notify(self, switch, state):
|
|
||||||
if switch.get_active() == True:
|
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/caffeine.sh"], shell=True)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
#### supergfxctl Switch ####
|
|
||||||
|
|
||||||
supergfxctl_switch = self.builder.get_object("supergfxctl_switch")
|
|
||||||
|
|
||||||
supergfxctl_output = subprocess.run(
|
|
||||||
["gsettings get org.gnome.shell enabled-extensions | grep supergfxctl-gex@asus-linux.org"], shell=True)
|
|
||||||
|
|
||||||
if (supergfxctl_output.returncode) == 0:
|
|
||||||
supergfxctl_switch.set_active(True)
|
|
||||||
|
|
||||||
def on_supergfxctl_switch_active_notify(self, switch, state):
|
|
||||||
if switch.get_active() == True:
|
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/supergfxctl.sh"], shell=True)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
#### kde Switch ####
|
|
||||||
|
|
||||||
kde_switch = self.builder.get_object("kde_switch")
|
kde_switch = self.builder.get_object("kde_switch")
|
||||||
|
kde_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep gsconnect@andyholmes.github.io"], shell=True)
|
||||||
kde_output = subprocess.run(
|
|
||||||
["gsettings get org.gnome.shell enabled-extensions | grep gsconnect@andyholmes.github.io"], shell=True)
|
|
||||||
|
|
||||||
if (kde_output.returncode) == 0:
|
if (kde_output.returncode) == 0:
|
||||||
kde_switch.set_active(True)
|
kde_switch.set_active(True)
|
||||||
|
|
||||||
def on_kde_switch_active_notify(self, switch, state):
|
|
||||||
if switch.get_active() == True:
|
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/kde.sh"], shell=True)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
#### weather Switch ####
|
|
||||||
|
|
||||||
weather_switch = self.builder.get_object("weather_switch")
|
weather_switch = self.builder.get_object("weather_switch")
|
||||||
|
|
||||||
weather_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep openweather-extension@jenslody.de"], shell=True)
|
weather_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep openweather-extension@jenslody.de"], shell=True)
|
||||||
|
|
||||||
if (weather_output.returncode) == 0:
|
if (weather_output.returncode) == 0:
|
||||||
weather_switch.set_active(True)
|
weather_switch.set_active(True)
|
||||||
|
|
||||||
def on_weather_switch_active_notify(self, switch, state):
|
|
||||||
if switch.get_active() == True:
|
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/weather.sh"], shell=True)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
#### spacebar Switch ####
|
|
||||||
|
|
||||||
spacebar_switch = self.builder.get_object("spacebar_switch")
|
spacebar_switch = self.builder.get_object("spacebar_switch")
|
||||||
|
|
||||||
spacebar_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep space-bar@luchrioh"], shell=True)
|
spacebar_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep space-bar@luchrioh"], shell=True)
|
||||||
|
|
||||||
if (spacebar_output.returncode) == 0:
|
if (spacebar_output.returncode) == 0:
|
||||||
spacebar_switch.set_active(True)
|
spacebar_switch.set_active(True)
|
||||||
|
|
||||||
def on_spacebar_switch_active_notify(self, switch, state):
|
|
||||||
if switch.get_active() == True:
|
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/spacebar.sh"], shell=True)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
#### stats Switch ####
|
|
||||||
|
|
||||||
stats_switch = self.builder.get_object("stats_switch")
|
stats_switch = self.builder.get_object("stats_switch")
|
||||||
|
|
||||||
stats_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep Vitals@CoreCoding.com"], shell=True)
|
stats_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep Vitals@CoreCoding.com"], shell=True)
|
||||||
|
|
||||||
if (stats_output.returncode) == 0:
|
if (stats_output.returncode) == 0:
|
||||||
stats_switch.set_active(True)
|
stats_switch.set_active(True)
|
||||||
|
|
||||||
def on_stats_switch_active_notify(self, switch, state):
|
|
||||||
if switch.get_active() == True:
|
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/stats.sh"], shell=True)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
#### hid Switch ####
|
|
||||||
|
|
||||||
hid_switch = self.builder.get_object("hid_switch")
|
hid_switch = self.builder.get_object("hid_switch")
|
||||||
|
|
||||||
hid_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep wireless-hid@chlumskyvaclav.gmail.com"], shell=True)
|
hid_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep wireless-hid@chlumskyvaclav.gmail.com"], shell=True)
|
||||||
|
|
||||||
if (hid_output.returncode) == 0:
|
if (hid_output.returncode) == 0:
|
||||||
hid_switch.set_active(True)
|
hid_switch.set_active(True)
|
||||||
|
|
||||||
def on_hid_switch_active_notify(self, switch, state):
|
|
||||||
if switch.get_active() == True:
|
#### Desktop Switch ####
|
||||||
|
def on_desktop_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True :
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/desktop.sh"], shell=True)
|
||||||
|
pass
|
||||||
|
#### Audio Switch ####
|
||||||
|
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)
|
||||||
|
pass
|
||||||
|
#### Blur Switch ####
|
||||||
|
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)
|
||||||
|
pass
|
||||||
|
#### Tray Switch ####
|
||||||
|
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)
|
||||||
|
pass
|
||||||
|
#### workspace Switch ####
|
||||||
|
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)
|
||||||
|
pass
|
||||||
|
#### x11 Switch ####
|
||||||
|
def on_x11_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True :
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/x11.sh"], shell=True)
|
||||||
|
pass
|
||||||
|
#### clipboard Switch ####
|
||||||
|
def on_clipboard_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True :
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/clipboard.sh"], shell=True)
|
||||||
|
pass
|
||||||
|
#### caffeine Switch ####
|
||||||
|
def on_caffeine_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/caffeine.sh"], shell=True)
|
||||||
|
pass
|
||||||
|
#### supergfxctl Switch ####
|
||||||
|
def on_supergfxctl_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/supergfxctl.sh"], shell=True)
|
||||||
|
pass
|
||||||
|
#### kde Switch ####
|
||||||
|
def on_kde_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/kde.sh"], shell=True)
|
||||||
|
pass
|
||||||
|
#### weather Switch ####
|
||||||
|
def on_weather_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/weather.sh"], shell=True)
|
||||||
|
pass
|
||||||
|
#### spacebar Switch ####
|
||||||
|
def on_spacebar_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/spacebar.sh"], shell=True)
|
||||||
|
pass
|
||||||
|
#### stats Switch ####
|
||||||
|
def on_stats_switch_active_notify(self, switch, state):
|
||||||
|
if stats_switch.get_active() == True:
|
||||||
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/stats.sh"], shell=True)
|
||||||
|
else:
|
||||||
|
print("test")
|
||||||
|
pass
|
||||||
|
#### hid Switch ####
|
||||||
|
def on_hid_switch_active_notify(self, switch, state):
|
||||||
|
if switch.get_active() == True:
|
||||||
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/hid.sh"], shell=True)
|
subprocess.run(["/etc/nobara/scripts/nobara-layouts/settings-scripts/hid.sh"], shell=True)
|
||||||
return 0
|
pass
|
||||||
|
|
||||||
Application()
|
Application()
|
||||||
Gtk.main()
|
Gtk.main()
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
<property name="can-focus">False</property>
|
<property name="can-focus">False</property>
|
||||||
<property name="homogeneous">True</property>
|
<property name="homogeneous">True</property>
|
||||||
<property name="stack">main_stack</property>
|
<property name="stack">main_stack</property>
|
||||||
|
<signal name="show" handler="on_main_switcher_show" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
<property name="can-focus">False</property>
|
<property name="can-focus">False</property>
|
||||||
<property name="homogeneous">True</property>
|
<property name="homogeneous">True</property>
|
||||||
<property name="stack">main_stack</property>
|
<property name="stack">main_stack</property>
|
||||||
|
<signal name="show" handler="on_main_switcher_show" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@ -270,6 +271,7 @@
|
|||||||
<property name="can-focus">True</property>
|
<property name="can-focus">True</property>
|
||||||
<property name="hscrollbar-policy">never</property>
|
<property name="hscrollbar-policy">never</property>
|
||||||
<property name="shadow-type">in</property>
|
<property name="shadow-type">in</property>
|
||||||
|
<signal name="show" handler="on_settings_scroll_show" swapped="no"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkViewport">
|
<object class="GtkViewport">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user