This commit is contained in:
Ward Nakchbandi 2022-09-30 16:39:25 +03:00
parent 03b087ff5d
commit 4ac7c362be

View File

@ -43,78 +43,66 @@ class Application:
desktop_switch.set_active(True) desktop_switch.set_active(True)
else: else:
desktop_switch.set_active(False) desktop_switch.set_active(False)
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, stdout=subprocess.DEVNULL) audio_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep volume-mixer@evermiss.net"], shell=True, stdout=subprocess.DEVNULL)
if (audio_output.returncode) == 0: if (audio_output.returncode) == 0:
audio_switch.set_active(True) audio_switch.set_active(True)
else: else:
audio_switch.set_active(False) audio_switch.set_active(False)
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, stdout=subprocess.DEVNULL) blur_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep blur-my-shell@aunetx"], shell=True, stdout=subprocess.DEVNULL)
if (blur_output.returncode) == 0: if (blur_output.returncode) == 0:
blur_switch.set_active(True) blur_switch.set_active(True)
else: else:
blur_switch.set_active(False) blur_switch.set_active(False)
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 appindicatorsupport@rgcjonas.gmail.com"], shell=True, stdout=subprocess.DEVNULL) tray_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep appindicatorsupport@rgcjonas.gmail.com"], shell=True, stdout=subprocess.DEVNULL)
if (tray_output.returncode) == 0: if (tray_output.returncode) == 0:
tray_switch.set_active(True) tray_switch.set_active(True)
else: else:
tray_switch.set_active(False) tray_switch.set_active(False)
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, stdout=subprocess.DEVNULL) workspace_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep auto-move-windows@gnome-shell-extensions.gcampax.github.com"], shell=True, stdout=subprocess.DEVNULL)
if (workspace_output.returncode) == 0: if (workspace_output.returncode) == 0:
workspace_switch.set_active(True) workspace_switch.set_active(True)
else: else:
workspace_switch.set_active(False) workspace_switch.set_active(False)
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 gestureImprovements@gestures"], shell=True, stdout=subprocess.DEVNULL) x11_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep gestureImprovements@gestures"], shell=True, stdout=subprocess.DEVNULL)
if (x11_output.returncode) == 0: if (x11_output.returncode) == 0:
x11_switch.set_active(True) x11_switch.set_active(True)
else: else:
x11_switch.set_active(False) x11_switch.set_active(False)
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 clipboard-history@alexsaveau.dev"], shell=True, stdout=subprocess.DEVNULL) clipboard_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep clipboard-history@alexsaveau.dev"], shell=True, stdout=subprocess.DEVNULL)
if (clipboard_output.returncode) == 0: if (clipboard_output.returncode) == 0:
clipboard_switch.set_active(True) clipboard_switch.set_active(True)
else: else:
clipboard_switch.set_active(False) clipboard_switch.set_active(False)
supergfxctl_switch = self.builder.get_object("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, stdout=subprocess.DEVNULL) supergfxctl_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep supergfxctl-gex@asus-linux.org"], shell=True, stdout=subprocess.DEVNULL)
if (supergfxctl_output.returncode) == 0: if (supergfxctl_output.returncode) == 0:
supergfxctl_switch.set_active(True) supergfxctl_switch.set_active(True)
else: else:
supergfxctl_switch.set_active(False) supergfxctl_switch.set_active(False)
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 caffeine@patapon.info"], shell=True, stdout=subprocess.DEVNULL) caffeine_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep caffeine@patapon.info"], shell=True, stdout=subprocess.DEVNULL)
if (caffeine_output.returncode) == 0: if (caffeine_output.returncode) == 0:
caffeine_switch.set_active(True) caffeine_switch.set_active(True)
else: else:
caffeine_switch.set_active(False) caffeine_switch.set_active(False)
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, stdout=subprocess.DEVNULL) kde_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep gsconnect@andyholmes.github.io"], shell=True, stdout=subprocess.DEVNULL)
if (kde_output.returncode) == 0: if (kde_output.returncode) == 0:
kde_switch.set_active(True) kde_switch.set_active(True)
else: else:
kde_switch.set_active(False) kde_switch.set_active(False)
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, stdout=subprocess.DEVNULL) weather_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep openweather-extension@jenslody.de"], shell=True, stdout=subprocess.DEVNULL)
if (weather_output.returncode) == 0: if (weather_output.returncode) == 0:
weather_switch.set_active(True) weather_switch.set_active(True)
else: else:
weather_switch.set_active(False) weather_switch.set_active(False)
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 freon@UshakovVasilii_Github.yahoo.com"], shell=True, stdout=subprocess.DEVNULL) stats_output = subprocess.run(["gsettings get org.gnome.shell enabled-extensions | grep freon@UshakovVasilii_Github.yahoo.com"], shell=True, stdout=subprocess.DEVNULL)
if (stats_output.returncode) == 0: if (stats_output.returncode) == 0:
@ -133,7 +121,6 @@ class Application:
pop_switch.set_active(True) pop_switch.set_active(True)
else: else:
pop_switch.set_active(False) pop_switch.set_active(False)
time.sleep(5.0) time.sleep(5.0)
t1 = threading.Thread(target=extension_refresh_func) t1 = threading.Thread(target=extension_refresh_func)
t1.start() t1.start()