diff --git a/.gitignore b/.gitignore index fb43c15..f706768 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,11 @@ __pycache__/ *.py[cod] *$py.class + +# PyCharm + +.idea + # C extensions *.so @@ -161,4 +166,4 @@ cython_debug/ # App specific files app.log -config.toml \ No newline at end of file +config.toml diff --git a/konawall/environments/gnome.py b/konawall/environments/gnome.py new file mode 100644 index 0000000..f141d14 --- /dev/null +++ b/konawall/environments/gnome.py @@ -0,0 +1,10 @@ +import subprocess +from konawall.module_loader import add_environment +from konawall.imager import combine_to_viewport + +@add_environment("gnome_setter") +def set_wallpapers(files: list, displays: list): + file = combine_to_viewport(displays, files) + command = ["gsettings", "set", "org.gnome.desktop.background", "picture-uri", f"file://{file.name}"] + command = ["gsettings", "set", "org.gnome.desktop.background", "picture-uri-dark", f"file://{file.name}"] + subprocess.run(command) diff --git a/konawall/gui.py b/konawall/gui.py index 813643e..17913b9 100755 --- a/konawall/gui.py +++ b/konawall/gui.py @@ -43,7 +43,7 @@ class Konawall(wx.adv.TaskBarIcon): # Reload (actually load) the config and modules. if wx.Platform == "__WXGTK__": from xdg_base_dirs import xdg_config_home - self.config_path = os.path.join(xdg_config_home(), "konawall", "config.toml") + self.config_path = os.path.join(xdg_config_home(), "konawall", "config.toml") if wx.Platform == "__WXMAC__": config_path_string = "~/Library/Application Support/konawall/config.toml" self.config_path = os.path.expanduser(config_path_string)