scorpion-26 / gBar

Blazingly fast status bar written with GTK
MIT License
459 stars 17 forks source link

Feature request: Show bar only when holding mod key #100

Open Etmix opened 2 months ago

Etmix commented 2 months ago

Is it already possible or possible to implement only showing the bar when holding a key?

To save screen space and avoid burn-in on OLED monitors, I'd like to only show the bar when holding the mod-key. This way I can see the bar when switching workspaces (because my keybinds for that in Hyprland are Mod-[1-9]) and on-demand when I need it, but it doesn't take screen space and doesn't risk burn-in when I don't.

Examples for bars that implement something like that are waybar and swaybar. I would much prefer using gBar though. Also, the implementation in waybar isn't great, because you can only toggle it by sending SIGUSR1, which can lead to problems when the key pressed and released events get mixed up.

A possible workaround is to kill and re-create the bar every time, but that isn't great performance-wise.