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

    ensure_service("gcal-sync.timer", user=True)
Пример #14
0
def enable_statusbar_service() -> None:
    ensure_service("statusbar", user=True)