hyprbars: add bar_inactive_color config option - #630
Open
stefanoamorelli wants to merge 2 commits into
Open
Conversation
Allow setting a different bar background color for inactive windows. The existing focus tracking (m_bWindowHasFocus) now runs unconditionally instead of only when inactive_button_color is set, so bar_inactive_color works independently.
The previous default of INT{0} collided with rgba(00000000), which
also evaluates to 0. This meant fully transparent colors could never
be used as bar_inactive_color, since the > 0 check treated them as
"unset". Switching to -1 as the sentinel and != -1 as the guard
allows any valid color value, including fully transparent ones.
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.
Adds a
bar_inactive_colorconfig option, allowing a different bar background color for inactive windows. This complements the existinginactive_button_coloroption.The focus tracking logic now runs unconditionally (instead of only when
inactive_button_coloris set) so both features work independently. The default sentinel uses-1instead of0to allow fully transparent colors likergba(00000000).Usage
plugin:hyprbars { bar_color = rgba(ff0000ff) bar_inactive_color = rgba(414868ff) }When unset (default), inactive windows use the regular
bar_color.Demo
hyprland-plugins-inactive-color.mp4