Commit ad4d6dd6 authored by Matti Hyttinen's avatar Matti Hyttinen
Browse files

Merge branch 'master' into 'hello'

Master

See merge request !12
parents cbaf54fb a2d300d3
__version__ = "0.6.6" __version__ = "0.7"
...@@ -364,7 +364,7 @@ class LayoutBox(Gtk.Box): ...@@ -364,7 +364,7 @@ class LayoutBox(Gtk.Box):
desk_switch = Gtk.Switch() desk_switch = Gtk.Switch()
desk_switch.set_hexpand(False) desk_switch.set_hexpand(False)
desk_enabled = subprocess.run( desk_enabled = subprocess.run(
"gnome-extensions info desktop-icons@csoriano | grep -q ENABLED", shell=True) "gnome-extensions info ding@rastersoft.com | grep -q ENABLED", shell=True)
if desk_enabled.returncode == 0: if desk_enabled.returncode == 0:
desk_switch.set_active(True) desk_switch.set_active(True)
else: else:
...@@ -374,6 +374,20 @@ class LayoutBox(Gtk.Box): ...@@ -374,6 +374,20 @@ class LayoutBox(Gtk.Box):
desk_label.set_markup(" Desktop icons") desk_label.set_markup(" Desktop icons")
desk_label.props.halign = Gtk.Align.START desk_label.props.halign = Gtk.Align.START
# Automatic dark theme
dark_switch = Gtk.Switch()
dark_switch.set_hexpand(False)
dark_enabled = subprocess.run(
"gnome-extensions info nightthemeswitcher@romainvigier.fr | grep -q ENABLED", shell=True)
if dark_enabled.returncode == 0:
dark_switch.set_active(True)
else:
dark_switch.set_active(False)
dark_switch.connect("notify::active", self.on_dark_activated)
dark_label = Gtk.Label()
dark_label.set_markup(" Automatic dark theme")
dark_label.props.halign = Gtk.Align.START
# Gnome Tweaks # Gnome Tweaks
theme_button = Gtk.Button.new_with_label("Open") theme_button = Gtk.Button.new_with_label("Open")
theme_button.connect("clicked", self.on_gnometweaks_activated) theme_button.connect("clicked", self.on_gnometweaks_activated)
...@@ -433,6 +447,8 @@ class LayoutBox(Gtk.Box): ...@@ -433,6 +447,8 @@ class LayoutBox(Gtk.Box):
theme_grid.attach(desk_label, 3, 5, 2, 1) theme_grid.attach(desk_label, 3, 5, 2, 1)
theme_grid.attach(tray_switch, 1, 6, 1, 1) theme_grid.attach(tray_switch, 1, 6, 1, 1)
theme_grid.attach(tray_label, 3, 6, 2, 1) theme_grid.attach(tray_label, 3, 6, 2, 1)
theme_grid.attach(dark_switch, 1, 7, 1, 1)
theme_grid.attach(dark_label, 3, 7, 2, 1)
# theme_grid.attach(self.color_button, 1, 3, 1, 1) # theme_grid.attach(self.color_button, 1, 3, 1, 1)
# theme_grid.attach(color_label, 3, 3, 2, 1) # theme_grid.attach(color_label, 3, 3, 2, 1)
...@@ -550,10 +566,21 @@ class LayoutBox(Gtk.Box): ...@@ -550,10 +566,21 @@ class LayoutBox(Gtk.Box):
def on_desk_activated(self, switch, gparam): def on_desk_activated(self, switch, gparam):
if switch.get_active(): if switch.get_active():
state = "on" state = "on"
subprocess.run("gnome-extensions enable desktop-icons@csoriano", shell=True) subprocess.run("gnome-extensions enable ding@rastersoft.com", shell=True)
else:
state = "off"
subprocess.run("gnome-extensions disable ding@rastersoft.com", shell=True)
print("Desktop icons was turned", state)
def on_dark_activated(self, switch, gparam):
if switch.get_active():
state = "on"
subprocess.run("gnome-extensions enable nightshellswitcher@romainvigier.fr", shell=True)
subprocess.run("gnome-extensions enable nightthemeswitcher@romainvigier.fr", shell=True)
else: else:
state = "off" state = "off"
subprocess.run("gnome-extensions disable desktop-icons@csoriano", shell=True) subprocess.run("gnome-extensions disable nightshellswitcher@romainvigier.fr", shell=True)
subprocess.run("gnome-extensions disable nightthemeswitcher@romainvigier.fr", shell=True)
print("Desktop icons was turned", state) print("Desktop icons was turned", state)
def on_tray_activated(self, switch, gparam): def on_tray_activated(self, switch, gparam):
...@@ -654,7 +681,7 @@ class LayoutBox(Gtk.Box): ...@@ -654,7 +681,7 @@ class LayoutBox(Gtk.Box):
'classic': ( 'classic': (
'gsettings set org.gnome.shell enabled-extensions "[\'dash-to-panel@jderose9.github.com\', ' 'gsettings set org.gnome.shell enabled-extensions "[\'dash-to-panel@jderose9.github.com\', '
'\'user-theme@gnome-shell-extensions.gcampax.github.com\', ' '\'user-theme@gnome-shell-extensions.gcampax.github.com\', '
'\'appindicatorsupport@rgcjonas.gmail.com\', \'pamac-updates@manjaro.org\', ' '\'appindicatorsupport@rgcjonas.gmail.com\', \'ding@rastersoft.com\', \'pamac-updates@manjaro.org\', '
'\'arc-menu@linxgem33.com\']"', '\'arc-menu@linxgem33.com\']"',
'gsettings --schemadir /usr/share/gnome-shell/extensions/dash-to-panel@jderose9.github.com/schemas ' 'gsettings --schemadir /usr/share/gnome-shell/extensions/dash-to-panel@jderose9.github.com/schemas '
'set org.gnome.shell.extensions.dash-to-panel show-show-apps-button false', 'set org.gnome.shell.extensions.dash-to-panel show-show-apps-button false',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment