Automatically synchronize any of your configurations to git. A working example can be seen here
- Fork this repository
- Clone the forked repo (preferably with ssh, as this program will also automatically push and you won't be able to input password/passkey)
- Run systemd_setup.sh (if you have systemd)
- Profit
You can configure the directories or inidividual files that you want to synchronize by modifying ~/.config/synchronization_targets.json
The syntax is quite simple:
{
"directories": [
"~/path/to/your/dir1",
"~/path/to/your/dir2",
"~/path/to/your/dir3"
],
"files": [
"~/path/to/your/file.1",
"~/path/to/your/file.2",
"~/path/to/your/file.3"
]
}
synchronizer_service.py:
# Polling rate for file changes in seconds. Isn't as important, just make sure that it's not 0 if you use editors like neovim.
RATE = 0.5
VERBOSE_LOGGING = False
# Mainly used in development. If False, will not commit/push just log.
COMMIT = True
# Time since last commit in order to push. Used to prevent rate limits.
PUSH_RATE = 30
# Experimental. Use GPT for commit messages. Requires OPENAI_KEY environment variable
USE_OPENAI = False
I don't really have experience with systemd alternatives, but feel free to open a pr.