Skip to content

Add Nextcloud sync-needed prompt indicator#164

Merged
thavelick merged 2 commits into
mainfrom
nextcloud_sync_indicator
Jul 9, 2026
Merged

Add Nextcloud sync-needed prompt indicator#164
thavelick merged 2 commits into
mainfrom
nextcloud_sync_indicator

Conversation

@thavelick

Copy link
Copy Markdown
Owner

Summary

Adds a background check + prompt indicator so I can tell at a glance whether nextcloud-sync needs to be run.

  • bin/nextcloud-sync-check — runs rclone check, parses the N differences found line and touches/removes a ~/.cache/nextcloud-sync-needed sentinel. If the remote is unreachable (no summary line), it leaves the sentinel untouched to avoid false flags.
  • bin/nextcloud-sync — clears the sentinel after a successful bisync.
  • systemd/user/nextcloud-sync-check.{service,timer} — oneshot service + 30-min timer (Persistent=true catches up after suspend), wired into systemd/setup.sh.
  • zsh/prompt.zshnextcloud_indicator shows ☁️ when the sentinel exists, added to PROMPT outside the ~/Projects git block so it shows everywhere.

Activation

cd ~/Projects/dotfiles && DOTFILES_HOME=$PWD sh systemd/setup.sh
exec zsh

Notes

  • LibreOffice .~lock.*# files currently count as differences; can add an exclude to the check if that noise is unwanted.

🤖 Generated with Claude Code

thavelick and others added 2 commits July 9, 2026 16:53
A systemd user timer runs nextcloud-sync-check every 30 minutes, which uses
rclone check to detect whether ~/nextcloud is out of sync with the remote and
maintains a ~/.cache/nextcloud-sync-needed sentinel. The zsh prompt shows ☁️
while the sentinel is present, and nextcloud-sync clears it after a successful
bisync.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Linux systemd timer has no macOS equivalent, so add a launchd LaunchAgent
that runs bin/nextcloud-sync-check every 30 minutes (and once at login). The
plist is templated like rclone.conf so mac/setup.sh can substitute absolute
paths, sets a Homebrew PATH so rclone resolves under launchd, and is loaded via
launchctl. The check script, sync script, and prompt indicator are already
cross-platform.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thavelick thavelick merged commit f75dd12 into main Jul 9, 2026
3 checks passed
@thavelick thavelick deleted the nextcloud_sync_indicator branch July 9, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant