You are not logged in.
I'm using i3 with conky as statusbar, but having two bars really takes up a lot of precious precious screen real estate. I want to be able to have a key combination to toggle conky bar enable/disable. The simple crude way I came up with is with a script that killall conky if conky is running and conky & otherwise, but it seems like a very kludgy solution. I'm sure a lot of you have run into similar problems, so I wonder what solutions everyone came up with?
Last edited by darkfeline (2012-09-15 18:14:57)
Offline
You can use conky's ${if_existing file}...${endif} directive in your conkyrc; just put the contents of your conky bar in between. And then bind your key combination to a script like this one. That's what I use. It probably doesn't actually hide conky, though---just the text; my conky background is transparent, so without text it's invisible.
Offline
How do you have conky set up?
Currently I have conky with own_window and own_window_type_dock, so your solution would just leave a blank bar at the top of the screen. If I don't have conky as a dock window, then it'll only appear under windows on the wallpaper level (so I wouldn't need a toggle in the first place). If I could have conky appear over windows then your solution would work but I haven't been able to configure conky to do so with i3.
Offline
I'm using herbstluftwm, so I have its monitor padding set to leave space at the top for conky. The toggle_conky.sh script changes that setting.
Offline
Sigh. I haven't found a way to toggle conky (at least with i3). In the end, I just reduced the font size a little and settling for the fact that gnome/kde has more UI wasted space as consolation.
Offline
If you have conky as it's own window still and still haven't had any luck doing it through your WM, you might want to try using xdotool to windowmap/windowunmap it. Something along the lines of
xdotool search --onlyvisible --name 'conky' windowunmap %@ || xdotool search --name 'conky' windowmap %@should work, you just might need to check what conky actually names its windows.
Offline
Yes, thank you Wibjarm! It works perfectly!
#!/bin/bash
xdotool search --onlyvisible --class 'Conky' windowunmap %@ \
|| xdotool search --class 'Conky' windowmap %@Offline