Add runscript to keep "lorri daemon" running. For some reason, $dayjob Nix expressions sometimes crash it, so it is much more convenient to have it restart automatically instead of just running it detached or in "dvtm" tab.
72 lines
2.0 KiB
Plaintext
Executable File
72 lines
2.0 KiB
Plaintext
Executable File
#!/usr/bin/env python3
|
|
import os
|
|
from os.path import dirname, join as j
|
|
from subprocess import check_call
|
|
|
|
to_link = [
|
|
".config/atuin/config.toml",
|
|
".config/environ.conf",
|
|
".config/fish/config.fish",
|
|
".config/flake8",
|
|
".config/git/allowed_signers",
|
|
".config/git/config",
|
|
".config/git/hooks/commit-msg",
|
|
".config/git/hooks/post-commit",
|
|
".config/git/hooks/pre-commit",
|
|
".config/git/hooks/fsmonitor-watchmanv2",
|
|
".config/git/ignore",
|
|
".config/mpop/config",
|
|
".config/mr/bin/mr-snapshot",
|
|
".config/msmtp/config",
|
|
".config/python/pythonrc",
|
|
".config/readline/inputrc",
|
|
".config/starship.toml",
|
|
".config/tig/config",
|
|
".config/twtxt/config",
|
|
".emacs.d/init.el",
|
|
".emacs.d/snippets/haskell-mode/module",
|
|
".git-crypt/.gitattributes",
|
|
".git-crypt/keys/default/0/546FBB137FBAC45A8E97238AE722BE6A8D51D2EC.gpg",
|
|
".gitignore",
|
|
".haskeline",
|
|
".mailcap",
|
|
".local/state/bash/.keep",
|
|
".local/state/less/.keep",
|
|
".local/state/psql/.keep",
|
|
".local/state/python/.keep",
|
|
".local/state/tig/.keep",
|
|
".mitmproxy/mitmproxy-ca.pem",
|
|
".mrconfig",
|
|
".muttrc",
|
|
".rcrc",
|
|
".sqliterc",
|
|
".w3m/config",
|
|
".xinitrc",
|
|
"README.txt",
|
|
"bin",
|
|
"service/main/slstatus/run",
|
|
"service/main/lorri/run",
|
|
"service/main/lorri/log/run"
|
|
]
|
|
|
|
def make_symlink(source, destination):
|
|
os.makedirs(dirname(destination), exist_ok=True)
|
|
os.symlink(source, destination + "~")
|
|
os.rename(destination + "~", destination)
|
|
|
|
home = os.environ["HOME"]
|
|
here = os.getcwd()
|
|
for path in to_link:
|
|
make_symlink(j(here, path), j(home, path))
|
|
|
|
make_symlink(j(here, "neovim"), j(home, ".config/nvim"))
|
|
|
|
# TODO: Need to be vendored.
|
|
make_symlink(j(home, "devel/vim-plugins"), j(home, ".local/share/nvim/site/pack/git/start"))
|
|
make_symlink(j(home, "data/active/state/atuin"), j(home, ".local/share/atuin"))
|
|
make_symlink(j(home, "data/active/newsboat/urls"), j(home, ".config/newsboat/urls"))
|
|
|
|
check_call(["redo-ifchange", "neovim/fnl/custom/all"], close_fds=False)
|
|
|
|
# vim:ft=python:
|