diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-13 14:02:05 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-13 14:02:05 +0200 |
| commit | 9fc6ca0d9a9cdba9d5808951ce290e559a9e8554 (patch) | |
| tree | fab4f7bb606b38efaf00e22937c3c5a0f5cc0f57 /mail-overview/Accounts.qml | |
| parent | 87cd101eb3c55d0ad7e8f2142fcce90865da7d39 (diff) | |
| download | quickshell-9fc6ca0d9a9cdba9d5808951ce290e559a9e8554.tar.gz quickshell-9fc6ca0d9a9cdba9d5808951ce290e559a9e8554.zip | |
feat(mail-overview): show mail-watcher health in the drawer
The watcher already writes ~/.local/state/mail-watcher.heartbeat every
60s, so the drawer reads it and shows a dot: green when idling, yellow
when a folder gave up, red when the heartbeat is stale or missing.
Backoff stays green because it is normal recovery and the watcher's own
health check treats it that way. The staleness rule is reimplemented in
a few lines rather than shelling out to --status; the heartbeat file is
the documented cheap-to-poll surface.
Read once per open rather than watched: the heartbeat is written by
atomic replace, so an inotify watch held on the old inode dies with it.
"Sync now" is removed with its Process. The watcher triggers syncs, the
cron tick is the backstop, and waybar's right-click still runs
mailsync.sh.
Diffstat (limited to 'mail-overview/Accounts.qml')
| -rw-r--r-- | mail-overview/Accounts.qml | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/mail-overview/Accounts.qml b/mail-overview/Accounts.qml index 27cdcf9..0ae6886 100644 --- a/mail-overview/Accounts.qml +++ b/mail-overview/Accounts.qml @@ -184,32 +184,12 @@ Singleton { accounts = next; } - // Launching qtmaildir, and syncing. qtmaildir takes no arguments, so - // there is nothing to tell it about the account or thread clicked. + // Launching qtmaildir. It takes no arguments, so there is nothing to tell + // it about the account or thread clicked. Process { id: openProc; command: [`${Quickshell.env("HOME")}/bin/qtmaildir`] } function openClient() { openProc.running = false; openProc.running = true; } - - property bool syncing: false - - // mailsync.sh is already lock-protected against a concurrent cron run, so - // this does not need its own guard beyond not stacking clicks. - Process { - id: syncProc - command: [`${Quickshell.env("HOME")}/bin/mailsync.sh`] - onExited: { - root.syncing = false; - root.refresh(); - } - } - - function sync() { - if (syncing) return; - syncing = true; - syncProc.running = false; - syncProc.running = true; - } } |
