You are not logged in.
Pages: 1
Is there a way to toggle a dzen2 status bar on and off?
I'm currently using herbstluftwm, and I'd like to imitate the behaviour of window managers like Awesome and DWM, which hide the status bar with a keyboard shortcut (default is Mod-b). I have a dzen2 status bar. Is there a way to hide and unhide it in a similar way?
Thanks.
Offline
If hlwm doesn't have a built-in way to toggle the visibility of windows, you can use xdotool to do this. Just set dzen's -title-name and -slave-name to the same thing, preferably something that won't conflict with anything else, and then bind your key of choice to spawn this:
xdotool search --name <whatever> windowmap %@ || xdotool search --name <whatever> windowunmap %@It's not quite as nice and tidy as doing it with something built into the WM itself, but I've been using it for toggling my own dzen bar for a while and it works fine.
Offline
I haven't found anything in the hlwm docs that mention such a function. Thanks for the suggestion!
Offline
I use "pad" to show and hide the status bar. If your status bar is at the top of the screen, you can use these shortcuts:
hc keybind $Mod-b pad 0 0 0 0 0
hc keybind $Mod-Shift-b pad 0 15 0 0 0(mod+b hides the bar, mod+shift+b "unhides" it)
Last edited by 2ManyDogs (2012-05-26 16:51:50)
Offline
Is there a way to toggle a dzen2 status bar on and off?
I'm currently using herbstluftwm, and I'd like to imitate the behaviour of window managers like Awesome and DWM, which hide the status bar with a keyboard shortcut (default is Mod-b). I have a dzen2 status bar. Is there a way to hide and unhide it in a similar way?
if you're using the default panel.sh, then it is:
hc keybind $Mod-b emit_hook togglehidepanelIt toggles the visibility of dzen2 and updates the pad
Edit in April 2026: the emit_hook was missing in above code snippet
Last edited by thorsten (2026-04-29 07:18:32)
Offline
hc keybind $Mod-b pad 0 0 0 0 0 hc keybind $Mod-Shift-b pad 0 15 0 0
If you omit the 0s at the and or replace them by "", then the padding at this border will be left unchanged, which is more comfortable if one has e.g. a bar at the bottom that shouldn't be affected by this.
Thank you very much for the hlwm-report in the #!-forum :-)
Last edited by thorsten (2012-05-26 19:47:43)
Offline
^ thanks, and you're welcome
I think a few people started using hlwm after the review...
Offline
ibrunton wrote:Is there a way to toggle a dzen2 status bar on and off?
I'm currently using herbstluftwm, and I'd like to imitate the behaviour of window managers like Awesome and DWM, which hide the status bar with a keyboard shortcut (default is Mod-b). I have a dzen2 status bar. Is there a way to hide and unhide it in a similar way?
if you're using the default panel.sh, then it is:
hc keybind $Mod-b togglehidepanelIt toggles the visibility of dzen2 and updates the pad
I'm currently trying to understand that panel.sh script well enough to adapt it to my own script.
Offline
Pages: 1