mirror of
https://github.com/anufrievroman/waypaper.git
synced 2024-11-22 07:22:19 +03:00
Merge pull request #86 from CalfMoon/main
Improve multi-monitor support
This commit is contained in:
commit
70473ee152
@ -237,10 +237,12 @@ class App(Gtk.Window):
|
||||
|
||||
|
||||
def monitor_option_display(self) -> None:
|
||||
"""Display monitor option if backend is swww or hyprpaper (with swww installed)"""
|
||||
"""Display monitor option if backend is not feh or wallutils"""
|
||||
self.options_box.remove(self.monitor_option_combo)
|
||||
# Check available monitors:
|
||||
monitor_names = ["All"]
|
||||
if self.cf.backend in ["feh", "wallutils", "none"]:
|
||||
return
|
||||
monitor_names.extend(get_monitor_names())
|
||||
|
||||
# Create a monitor option dropdown menu:
|
||||
|
@ -25,8 +25,8 @@ def change_wallpaper(image_path: Path, cf: Config, monitor: str, txt: Chinese|En
|
||||
|
||||
fill = cf.fill_option.lower()
|
||||
command = ["swaybg"]
|
||||
# if monitor != "All":
|
||||
# command.extend(["-o", monitor])
|
||||
if monitor != "All":
|
||||
command.extend(["-o", monitor])
|
||||
command.extend(["-i", str(image_path)])
|
||||
command.extend(["-m", fill, "-c", cf.color])
|
||||
subprocess.Popen(command)
|
||||
@ -54,11 +54,10 @@ def change_wallpaper(image_path: Path, cf: Config, monitor: str, txt: Chinese|En
|
||||
|
||||
command = ["mpvpaper"]
|
||||
command.extend(["-o", f"no-audio loop {fill} --background-color='{cf.color}'"])
|
||||
# if monitor != "All":
|
||||
# command.extend([monitor])
|
||||
# else:
|
||||
# command.extend('*')
|
||||
command.extend('*')
|
||||
if monitor != "All":
|
||||
command.extend([monitor])
|
||||
else:
|
||||
command.extend('*')
|
||||
command.extend([image_path])
|
||||
subprocess.Popen(command)
|
||||
print(f"{txt.msg_setwith} {cf.backend}")
|
||||
|
Loading…
Reference in New Issue
Block a user