hyprwm / hyprland-plugins

Official plugins for Hyprland
BSD 3-Clause "New" or "Revised" License
521 stars 53 forks source link

Hyprbars: Is it possible to change color / icon of buttons according to some conditions? #98

Open dachinat opened 6 months ago

dachinat commented 6 months ago

I wanted to change color of "Fullscreen" button

hyprbars-button = rgb(cba6f7), 20, , hyprctl dispatch fullscreen 1

when window was in fullscreen mode.

I know that in bash we can get bool status of full-screen mode with

is_fullscreen="$(hyprctl -j activewindow | gojq -r '.fullscreen')"

2024-03-22-190719_hyprshot

(On the picture above a left button toggles a fullscreen mode).

Currently with my hyprland.conf configuration I'm applying a border color to window when in fullscreen mode, so that I'm aware that window is "fullscreened":

windowrulev2 = bordercolor rgb(5356FF) rgb(67C6E3),fullscreen:1

However, it would be great to have a feature to change color of button or icon, i.e.: introduce conditionals in hyprbars-button declarations. Or perhaps, there is some other way to achieve such behavior. 🙂 Thank you.

vaxerski commented 6 months ago

not atm

dachinat commented 6 months ago

Alright, thank you for your response.