https://github.com/thealexdev23/dotfiles-synchronizer
Automatically synchronize your dotfiles to git in the background
https://github.com/thealexdev23/dotfiles-synchronizer
Last synced: about 1 year ago
JSON representation
Automatically synchronize your dotfiles to git in the background
- Host: GitHub
- URL: https://github.com/thealexdev23/dotfiles-synchronizer
- Owner: TheAlexDev23
- License: mit
- Created: 2024-01-23T16:41:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-01T18:17:40.000Z (over 2 years ago)
- Last Synced: 2025-03-24T05:52:11.495Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 23
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Dotfiles Synchronizer
Automatically synchronize any of your configurations to git. A working example can be seen [here](https://github.com/TheAlexDev23/dotfiles)
## Installation
1. **Fork** this repository
2. Clone the forked repo (preferably with ssh, as this program will also automatically push and you won't be able to input password/passkey)
3. Run systemd_setup.sh (if you have systemd)
4. 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:
```json
{
"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"
]
}
```
## Other configuration
synchronizer_service.py:
```python
# 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
```
## What if I don't have systemd?
I don't really have experience with systemd alternatives, but feel free to open a pr.