omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

omarchy-toggle-waybar creates inconsistent state on boot

Open shmall03 opened this issue 4 months ago • 1 comments

Bug

omarchy-toggle-waybar toggles the waybar-off flag before checking whether waybar is running. This creates an inconsistent state that persists across reboots.

Steps to reproduce

  1. Boot with waybar not running (e.g. after a crash, race condition, or any reason waybar fails to start)
  2. Press SUPER+SHIFT+SPACE to activate waybar
  3. Waybar appears and is visible — but the waybar-off flag is now set
  4. Reboot — waybar does not start because the autostart check sees the flag

Root cause

In bin/omarchy-toggle-waybar:

omarchy-toggle waybar-off        # toggles flag BEFORE checking state

if pgrep -x waybar >/dev/null; then
  pkill -9 -x waybar
else
  uwsm-app -- waybar >/dev/null 2>&1 &
fi

When waybar is not running:

  1. omarchy-toggle waybar-off creates the flag
  2. Waybar starts (because it wasn't running)
  3. Result: waybar running + flag set → next boot skips autostart

Fix

Check whether waybar is running first, then toggle the flag to match:

if pgrep -x waybar >/dev/null; then
  omarchy-toggle waybar-off
  pkill -9 -x waybar
else
  omarchy-toggle waybar-off
  uwsm-app -- waybar >/dev/null 2>&1 &
fi

This ensures the flag always reflects the actual desired state.

shmall03 avatar Jul 20 '26 13:07 shmall03

Thanks for the report. This will be sorted with the release of quattro, as we've switched away from waybar onto Quickshell 👍

dhh avatar Jul 20 '26 14:07 dhh