Instead of opening an issue on github for this small one line problem I thought it would be better for me to post it here on reddit.
If you have a bar only on one side, say bottom, and rest are Gap
s, the hide_show_bar() function's default option "all", doesn't work and throws an error warning, Gap object has no attribute is_show()
, since the bars on other sides are bar.Gap
objects.
#in libqtile/core/manager.py function cmd_hide_show_bar
for bar in [screen.left, screen.right, screen.top, screen.bottom]:
#if bar: #the original condition
if isinstance(bar, libqtile.bar.Bar):
if is_show is None:
is_show = not bar.is_show()
bar.show(is_show)
Instead of using the if bar:
condition, checking if the bar is an actual bar or gap resolves the issue.
It also did not work for the bottom bar, even tho it was a bar.Bar
object for some reason. I didn't bother checking it, since just changing the check condition fixed it.
I don't know if this is meant to be as is for bars on all sides only, but I think this way, you wouldn't have to toggle each bar one at a time either.
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/qtile/comme...