This commit is contained in:
2025-12-06 03:47:58 +03:00
parent e647551a98
commit 978060c5ef
4 changed files with 47 additions and 13 deletions
+1
View File
@@ -83,6 +83,7 @@
natural_scroll = true;
follow_mouse = 1;
numlock_by_default = true;
scroll_method = "2fg";
touchpad = {
disable_while_typing = true;
@@ -14,22 +14,11 @@ import uuid
WALLPAPERS_DIR = str(
pathlib.Path(
os.environ.get("WALLPAPERS_DIR")
or pathlib.Path.home() / "Pictures" / "Wallpapers"
os.environ.get("WALLPAPERS_DIR") or pathlib.Path("~/Pictures/Wallpapers")
).expanduser()
)
SYMLINK_PATH = str(pathlib.Path("~/Pictures/wallpaper.png").expanduser())
# old_print = print
# def new_print(*args, **kwargs):
# old_print(*args, **kwargs)
# old_print("\r", end="")
# print = new_print
def check_setup() -> None:
# Check required programs are available
@@ -483,6 +472,46 @@ def switch_folders(folders: list[str], on: bool = False, off: bool = False) -> N
print(f"Turned OFF folder: {folder_name}")
def list_wallpapers(path: str | None = None, verbose: bool = False) -> None:
# WIP
return
wallpaper_path = pathlib.Path(WALLPAPERS_DIR)
if path:
wallpaper_path = wallpaper_path / path
if not wallpaper_path.is_dir():
print(f"Folder not found: {wallpaper_path}")
return
"""
def _collect_png_files(wallpapers_dir: pathlib.Path, files: list[pathlib.Path]):
# If directory contains a ".off" file → skip entire directory
# for item in wallpapers_dir.iterdir():
# print(f"Checking item: {item}")
if any(item.name == ".off" for item in wallpapers_dir.iterdir()):
print(f"Skipping folder (contains .off): {wallpapers_dir}")
return
for item in wallpapers_dir.iterdir():
if item.is_file():
if item.suffix.lower() == ".png":
# print(f"Found wallpaper file: {item}")
files.append(item)
elif item.is_dir():
_collect_png_files(item, files)
"""
def _walk_in_dir(
wallpapers_dir: pathlib.Path, dirs: list[pathlib.Path], deepth: int = 0
):
for item in wallpapers_dir.iterdir():
if item.is_dir():
print(
f"{item.name}"
) # относительное имя + свойства (размер, кол-во изображений, включенность)
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
prog="Wallpaper Setter",
@@ -624,7 +653,7 @@ def main():
path=args.file, random=args.random, interactive=args.interactive
)
case "list" | "l":
pass
list_wallpapers(path=args.file, verbose=args.verbose)
case "switch" | "sw":
switch_folders(args.folders, on=args.on, off=args.off)
case "info" | "i":
+1
View File
@@ -22,6 +22,7 @@
syncthing
todo
pass
gtypist
# yubikey-manager-qt
];