fix: Preserve Waybar hidden state across theme changes#117
Open
kmanisk wants to merge 1 commit intodusklinux:mainfrom
Open
fix: Preserve Waybar hidden state across theme changes#117kmanisk wants to merge 1 commit intodusklinux:mainfrom
kmanisk wants to merge 1 commit intodusklinux:mainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 toXDG_RUNTIME_DIRbefore Matugenruns if Waybar was running, skips it if hidden. Added
detect_waybar_stateand
restore_waybar_statefunctions, called inapply_random_wallpaperand
regenerate_current.waybar_autostart.sh— addedtheme-changeargument guard. If called withthis arg and state file is absent, exits without launching Waybar.
config.toml— passestheme-changearg in waybar post_hook. Also fixesvesktop post_hook path typo (
$HOME/~/→$HOME/).