Skip to content

hyprbars: add bar_inactive_color config option - #630

Open
stefanoamorelli wants to merge 2 commits into
hyprwm:mainfrom
stefanoamorelli:main
Open

hyprbars: add bar_inactive_color config option#630
stefanoamorelli wants to merge 2 commits into
hyprwm:mainfrom
stefanoamorelli:main

Conversation

@stefanoamorelli

@stefanoamorelli stefanoamorelli commented Mar 15, 2026

Copy link
Copy Markdown

Adds a bar_inactive_color config option, allowing a different bar background color for inactive windows. This complements the existing inactive_button_color option.

The focus tracking logic now runs unconditionally (instead of only when inactive_button_color is set) so both features work independently. The default sentinel uses -1 instead of 0 to allow fully transparent colors like rgba(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

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