To keep org files sane and in check you need an auto-syncing solution, capable of competently merging separate notes on machines together.
In terms of solutions we have:
#tangle syncer.fish
function syncer -d "sync remote periodically with notifications"
while true
nix run nixpkgs#git-sync
set time "$(date +"%R %D" )"
set sleep "$(math 60x 60)"
if test $status -eq 0
notify-send "git sync" "Sync successful at $time"
else
notify-send -t $(math 1000x 60x 2) -u critical "git sync" "Sync failure at $time"
end
echo "time: $time, next in $sleep seconds"
sleep "$sleep"
end
end
A good way of login is ssh-agent. You can even have fine grained SSH identities on github for repos read/write access!
Works in weird ways. Requires all changes to be unstaged before
committing - huh. One nice idea is canceling commit when new files are
present - #...#
bullshit from emacs or result
symlink from nix. While nice in theory, it can get cumbersome always
calling git-sync -n
on new files, which is a frequent
occurance when doing notes. How about a patch that allows new files only
if they are staged?
--exechook-command
- pre commit hook