def ensure_user_dirs_exist() -> None: with open("user_dirs/dirs", "r") as dirs_file: for line in dirs_file: if line.startswith("#"): continue dirname = line.split("=")[1]\ .strip('"\n')\ .replace("$HOME", str(Path.home())) location = Path(dirname) if not location.exists(): location.mkdir(parents=True) # this *can't* run first otherwise it will remove the symlink and replace # with a bad default file ensure_service("xdg-user-dirs-update", user=True)
def start_nm_tray() -> None: ensure_service("networkmanager-tray", user=True)
def enable_screenlock_service() -> None: ensure_service("screenlock", user=True)
def start_compositor_service() -> None: ensure_service("compositor", user=True)
def start_notification_service() -> None: ensure_service("notifications", user=True)
def periodic_adblock_updates() -> None: ensure_service("adblock-update.timer", user=True) if not (HOME / ".local/share/luakit/adblock/easylist.txt").exists(): run("_update-adblock")
def enable_autorandr_service() -> None: ensure_service("autorandr")
def start_docker_service() -> None: ensure_service("docker.service")
def unclutter_enabled() -> None: ensure_service("unclutter", user=True)
def enable_wallpaper_timer() -> None: ensure_service("wallpaper.timer", user=True)
def enable_dropbox_service() -> None: ensure_service("dropbox", user=True)
def smartcard_daemon_running() -> None: ensure_service("pcscd.socket")
def enable_sync_timer() -> None: global ENABLED if not ENABLED: return ensure_service("gcal-sync.timer", user=True)
def enable_statusbar_service() -> None: ensure_service("statusbar", user=True)