mirror of
https://github.com/kittywitch/konawall-py.git
synced 2026-02-09 04:19:19 -08:00
License as MIT, KDE support, nix package and flake
This commit is contained in:
parent
3c196d83d0
commit
4a18fa6337
19 changed files with 219 additions and 39 deletions
16
konawall/environments/kde.py
Normal file
16
konawall/environments/kde.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import subprocess
|
||||
from konawall.module_loader import add_environment
|
||||
|
||||
"""
|
||||
This sets the wallpaper on KDE.
|
||||
"""
|
||||
@add_environment("kde_setter")
|
||||
def set_wallpapers(files: list, displays: list):
|
||||
for file in files:
|
||||
kde_script = f"""
|
||||
for (const desktop of desktops()) {{
|
||||
desktop.currentConfigGroup = ["Wallpaper", "org.kde.image", "General"]
|
||||
desktop.writeConfig("Image", "{file}")
|
||||
}}
|
||||
"""
|
||||
subprocess.run(["qdbus", "org.kde.plasmashell", "/PlasmaShell", "org.kde.PlasmaShell.evaluateScript", kde_script])
|
||||
Loading…
Add table
Add a link
Reference in a new issue