Skip to content

fix: Preserve Waybar hidden state across theme changes#117

Open
kmanisk wants to merge 1 commit intodusklinux:mainfrom
kmanisk:fix/waybar-hidden-state
Open

fix: Preserve Waybar hidden state across theme changes#117
kmanisk wants to merge 1 commit intodusklinux:mainfrom
kmanisk:fix/waybar-hidden-state

Conversation

@kmanisk
Copy link

@kmanisk kmanisk commented Feb 17, 2026

Waybar was unconditionally restarted on every theme change even when
intentionally hidden by the user. This happened because Matugen's waybar
post_hook ran waybar_autostart.sh in a separate process, completely bypassing
any state detection in theme_ctl.sh.

Changes:

  • theme_ctl.sh — writes a state file to XDG_RUNTIME_DIR before Matugen
    runs if Waybar was running, skips it if hidden. Added detect_waybar_state
    and restore_waybar_state functions, called in apply_random_wallpaper
    and regenerate_current.
  • waybar_autostart.sh — added theme-change argument guard. If called with
    this arg and state file is absent, exits without launching Waybar.
  • config.toml — passes theme-change arg in waybar post_hook. Also fixes
    vesktop post_hook path typo ($HOME/~/$HOME/).

Waybar was restarting on every theme change even when intentionally hidden.
Fixed by using a state file in XDG_RUNTIME_DIR to track Waybar visibility
across process boundaries, so waybar_autostart.sh respects the hidden state
when triggered by Matugen's post_hook. Also fixes vesktop config path typo.
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

Comments