I am trying to hide the status bar when the group is "WWW" and unhide the
status bar when on any other group. I tried the following code but the
qtile log gives an error that says libqtile.qtile is None.
===========CODE==========
@hook.subscribe.changegroup
def toggle_bar():
bar = qtile.current_screen.top
current_group = qtile.current_group
if current_group == "WWW":
bar.size = 0
bar.window.hide()
current_group.layout_all()
else:
bar.size = 24
bar.window.unhide()
current_group.layout_all()
==========================
===========ERROR===========
2021-07-19 19:10:45,941 ERROR libqtile hook.py:fire():L391 Error in hook
changegroup Traceback (most recent call last): File
"/usr/lib/python3.9/site-packages/libqtile/hook.py", line 389, in fire
i(*args, **kwargs) File "/home/chaitanya/.config/qtile/config.py", line 24,
in toggle_bar bar = qtile.current_screen.top AttributeError: 'NoneType'
object has no attribute 'top'
==========================
I tried the same thing with with the setgroup hook and I get the a
different error.
===========ERROR===========
2021-07-19 19:10:03,735 ERROR libqtile hook.py:fire():L391 Error in hook
setgroup
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/libqtile/hook.py", line 389, in
fire
i(*args, **kwargs)
File "/home/chaitanya/.config/qtile/config.py", line 32, in toggle_bar
bar.window.unhide()
AttributeError: 'NoneType' object has no attribute 'unhide'
==========================
--
You received this message because you are subscribed to the Google Groups
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/qtile-dev/e5bc6607-727a-46e0-b419-ebd8bb99b970n%40googlegroups.com.