Example #1
0
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)
Example #2
0
def start_nm_tray() -> None:
    ensure_service("networkmanager-tray", user=True)
Example #3
0
def enable_screenlock_service() -> None:
    ensure_service("screenlock", user=True)
Example #4
0
def start_compositor_service() -> None:
    ensure_service("compositor", user=True)
Example #5
0
def start_notification_service() -> None:
    ensure_service("notifications", user=True)
Example #6
0
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")
Example #7
0
def enable_autorandr_service() -> None:
    ensure_service("autorandr")
Example #8
0
def start_docker_service() -> None:
    ensure_service("docker.service")
Example #9
0
def unclutter_enabled() -> None:
    ensure_service("unclutter", user=True)
Example #10
0
def enable_wallpaper_timer() -> None:
    ensure_service("wallpaper.timer", user=True)
Example #11
0
def enable_dropbox_service() -> None:
    ensure_service("dropbox", user=True)
Example #12
0
def smartcard_daemon_running() -> None:
    ensure_service("pcscd.socket")
Example #13
0
def enable_sync_timer() -> None:
    global ENABLED
    if not ENABLED:
        return

    ensure_service("gcal-sync.timer", user=True)
Example #14
0
def enable_statusbar_service() -> None:
    ensure_service("statusbar", user=True)