Rearchitecture the project for Poetry support.

This commit is contained in:
Kat Inskip 2023-10-06 16:07:16 -07:00
parent 6cc517c163
commit 4ae3ddc2c0
16 changed files with 603 additions and 47 deletions

View file

@ -0,0 +1,14 @@
import subprocess
from module_loader import add_environment
"""
This sets wallpapers on Darwin.
:param files: A list of files to set as wallpapers
"""
@add_environment("darwin_setter")
def set_wallpapers(files: list, displays: list):
for i, file in enumerate(files):
# Run osascript to set the wallpaper for each monitor
command = f'tell application "System Events" to set picture of desktop {i} to "{file}"'
subprocess.run(["osascript", "-e", command])