[Feature] Custom Config File Path with Git-Reminder Hint
Description
Currently, Syndi always reads and writes its configuration to ~/.syndi/config.json. This makes it hard to keep the config in version control, back it up, or move it to a new machine.
This feature adds a single setting that lets users point Syndi at a config.json of their choice — for example, one that already lives inside a dotfiles Git repository. Syndi itself performs no Git operations; the user remains fully in charge of their repository. As a gentle nudge, Syndi will show a notification after saving the config if it detects the file is inside a Git repository, reminding the user to commit and push.
Current Behaviour
~/.syndi/config.json is the only supported config location (hardcoded in syndi.py).
- No feedback is given to the user about version-controlling their config.
Proposed Behaviour
- Custom config path — A new field in
~/.syndi/settings.json (a small, machine-local bootstrap file) lets users specify an alternative path for config.json, e.g. ~/dotfiles/syndi/config.json.
- Git-repo hint — After every successful config save, if Syndi detects that the config file sits inside a Git repository (i.e. a
.git directory exists somewhere in its parent hierarchy), it shows a macOS notification: "Config saved — don't forget to commit and push your changes."
- Feature is fully opt-in — When no custom path is configured, behaviour is identical to today.
Affected Code
| File |
What changes |
src/core.py |
New helper is_inside_git_repo(path) that walks parent dirs looking for .git; save_config() returns a boolean indicating whether the path is Git-tracked |
src/syndi.py |
Reads optional config_path from ~/.syndi/settings.json at startup; after save_config(), fires a rumps notification if the helper returns True |
src/preferences.py |
New text field in the Preferences dialog for the custom config file path |
Acceptance Criteria
Migration Path
- First launch after the update:
~/.syndi/settings.json does not exist, so Syndi falls back to ~/.syndi/config.json as usual.
- User opens Preferences, enters a path inside their dotfiles repo, and saves.
- Syndi copies the existing
~/.syndi/config.json to the new location on first use.
- All subsequent reads/writes go to the new path.
[Feature] Custom Config File Path with Git-Reminder Hint
Description
Currently, Syndi always reads and writes its configuration to
~/.syndi/config.json. This makes it hard to keep the config in version control, back it up, or move it to a new machine.This feature adds a single setting that lets users point Syndi at a
config.jsonof their choice — for example, one that already lives inside a dotfiles Git repository. Syndi itself performs no Git operations; the user remains fully in charge of their repository. As a gentle nudge, Syndi will show a notification after saving the config if it detects the file is inside a Git repository, reminding the user to commit and push.Current Behaviour
~/.syndi/config.jsonis the only supported config location (hardcoded insyndi.py).Proposed Behaviour
~/.syndi/settings.json(a small, machine-local bootstrap file) lets users specify an alternative path forconfig.json, e.g.~/dotfiles/syndi/config.json..gitdirectory exists somewhere in its parent hierarchy), it shows a macOS notification: "Config saved — don't forget to commit and push your changes."Affected Code
src/core.pyis_inside_git_repo(path)that walks parent dirs looking for.git;save_config()returns a boolean indicating whether the path is Git-trackedsrc/syndi.pyconfig_pathfrom~/.syndi/settings.jsonat startup; aftersave_config(), fires arumpsnotification if the helper returnsTruesrc/preferences.pyAcceptance Criteria
config.jsonvia the Preferences dialogMigration Path
~/.syndi/settings.jsondoes not exist, so Syndi falls back to~/.syndi/config.jsonas usual.~/.syndi/config.jsonto the new location on first use.