mirror of
https://github.com/kittywitch/konawall-py.git
synced 2026-02-09 12:29:19 -08:00
feat: xfce style on monitor count basis
This commit is contained in:
parent
2ab1de269d
commit
e3bf98deaf
1 changed files with 3 additions and 3 deletions
|
|
@ -4,13 +4,13 @@ from konawall.imager import combine_to_viewport
|
|||
|
||||
@add_environment("xfce_setter")
|
||||
def set_wallpapers(files: list, displays: list):
|
||||
file = combine_to_viewport(displays, files)
|
||||
command_for_last_image = ["xfconf-query", "--channel", "xfce4-desktop", "--list"]
|
||||
workspaces_command = subprocess.run(command_for_last_image, capture_output=True)
|
||||
workspaces_command_lines = workspaces_command.stdout.decode("utf-8").strip().split("\n")
|
||||
workspaces_command_wallpapers = [conf for conf in workspaces_command_lines if "last-image" in conf]
|
||||
set_command_base = ["xfconf-query", "-c", "xfce4-desktop", "-s", file.name, "-p"]
|
||||
for workspace_config in workspaces_command_wallpapers:
|
||||
for i, file in enumerate(files):
|
||||
workspace_config = workspaces_command_wallpapers[i]
|
||||
set_command_base = ["xfconf-query", "-c", "xfce4-desktop", "-s", file, "-p"]
|
||||
set_command = set_command_base + [workspace_config]
|
||||
set_style_command = ["xfconf-query", "-c", "xfce4-desktop", "-s", "5", "-p"] + [workspace_config.replace("last-image", "image-style")]
|
||||
subprocess.run(set_style_command)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue