Skip to content

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.

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-resume

The laptop host also re-arms keyboard backlight handling before on-resume.

You can run the recovery manually with the shared binding:

SUPER+SHIFT+W

Or from a terminal:

Terminal window
on-resume

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-notifications after a short delay.
  • Runs on-resume-update-prompt --launch unless the caller passed --post-update.

The log is written to:

${XDG_STATE_HOME:-~/.local/state}/on-resume.log

on-resume-update-prompt --launch runs a bounded update check:

Terminal window
dot update --check

When core or system repos are behind, it opens a floating terminal running:

Terminal window
on-resume-update-prompt --interactive

The 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.

Use this when the machine wakes but the bar or desktop helpers look stale:

  1. Press SUPER+SHIFT+W, or run on-resume.
  2. Wait for Waybar to disappear and return.
  3. Check for the update prompt or up-to-date notification.
  4. If something still looks wrong, read ~/.local/state/on-resume.log.

dot update can trigger a post-update refresh. That path should call:

Terminal window
on-resume --post-update

The --post-update flag skips the update prompt so a successful update does not immediately ask to update again.

If Waybar does not return, run it directly to surface errors:

Terminal window
uwsm-app -- waybar

If git status in the bar stays stale, remove the caches and run recovery again:

Terminal window
rm -f ~/.cache/waybar/git-*-waybar.json ~/.cache/waybar/git-*-waybar.json.tmp
rm -rf ~/.cache/dot/fetch-upstream
on-resume

If the update prompt never appears, run the launcher directly:

Terminal window
on-resume-update-prompt --launch

The launcher stays silent for update-check errors so resume is never blocked.