Resume Recovery
on-resume is the post-suspend recovery hook used by the Hypr host overrides. It restarts small desktop services that tend to go stale after sleep, refreshes git-related bar caches, and optionally opens a dotfiles update prompt.
Where it runs
Section titled “Where it runs”Both desktop and laptop host hypridle.conf files call on-resume from after_sleep_cmd after waking the display:
after_sleep_cmd = sleep 1 && omarchy-system-wake && on-resumeThe laptop host also re-arms keyboard backlight handling before on-resume.
You can run the recovery manually with the shared binding:
SUPER+SHIFT+WOr from a terminal:
on-resumeWhat it refreshes
Section titled “What it refreshes”on-resume detaches itself, writes a fresh log, then:
- Stops
twitch-notifications. - Clears Waybar git module cache files under
${XDG_CACHE_HOME:-~/.cache}/waybar. - Clears the dot upstream fetch cache under
${XDG_CACHE_HOME:-~/.cache}/dot/fetch-upstream. - Restarts Waybar through
uwsm-app. - Restarts
twitch-notificationsafter a short delay. - Runs
on-resume-update-prompt --launchunless the caller passed--post-update.
The log is written to:
${XDG_STATE_HOME:-~/.local/state}/on-resume.logUpdate prompt
Section titled “Update prompt”on-resume-update-prompt --launch runs a bounded update check:
dot update --checkWhen core or system repos are behind, it opens a floating terminal running:
on-resume-update-prompt --interactiveThe interactive prompt shows the behind repos, asks before running dot update, and leaves the terminal open afterwards.
When everything is current, it sends a low-urgency desktop notification instead.
Manual recovery flow
Section titled “Manual recovery flow”Use this when the machine wakes but the bar or desktop helpers look stale:
- Press
SUPER+SHIFT+W, or runon-resume. - Wait for Waybar to disappear and return.
- Check for the update prompt or up-to-date notification.
- If something still looks wrong, read
~/.local/state/on-resume.log.
Avoid duplicate prompts after updates
Section titled “Avoid duplicate prompts after updates”dot update can trigger a post-update refresh. That path should call:
on-resume --post-updateThe --post-update flag skips the update prompt so a successful update does not immediately ask to update again.
Troubleshooting
Section titled “Troubleshooting”If Waybar does not return, run it directly to surface errors:
uwsm-app -- waybarIf git status in the bar stays stale, remove the caches and run recovery again:
rm -f ~/.cache/waybar/git-*-waybar.json ~/.cache/waybar/git-*-waybar.json.tmprm -rf ~/.cache/dot/fetch-upstreamon-resumeIf the update prompt never appears, run the launcher directly:
on-resume-update-prompt --launchThe launcher stays silent for update-check errors so resume is never blocked.