mirror of
https://github.com/anufrievroman/waypaper.git
synced 2024-11-22 07:22:19 +03:00
feat: add fill options
This commit is contained in:
parent
960c86423b
commit
e365841470
@ -43,8 +43,17 @@ def change_wallpaper(image_path: Path, cf: Config, monitor: str, txt: Chinese|En
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
fill_types = {
|
||||
"fill": "panscan=1.0",
|
||||
"fit": "panscan=0.0",
|
||||
"center": "",
|
||||
"stretch": "--keepaspect=no",
|
||||
"tile": "",
|
||||
}
|
||||
fill = fill_types[cf.fill_option.lower()]
|
||||
|
||||
command = ["mpvpaper"]
|
||||
command.extend(["-o", f"no-audio loop"])
|
||||
command.extend(["-o", f"no-audio loop {fill}"])
|
||||
# if monitor != "All":
|
||||
# command.extend([monitor])
|
||||
# else:
|
||||
|
Loading…
Reference in New Issue
Block a user