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

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