contrib/inactive-windows-transparency: Set opacity of scratchpad windows on exit

`workspaces()` doesn't include windows in the scratchpad which means
they're left transparent when the script exits. This just iterates over
the scratchpad containers as well and resets their opacity.
This commit is contained in:
Ankit Pandey 2022-07-16 18:00:51 -07:00
parent 6b97c4fa71
commit 634944c566

View file

@ -32,9 +32,12 @@ def on_window_focus(inactive_opacity, ipc, event):
def remove_opacity(ipc):
for workspace in ipc.get_tree().workspaces():
tree = ipc.get_tree()
for workspace in tree.workspaces():
for w in workspace:
w.command("opacity 1")
for w in tree.scratchpad():
w.command("opacity 1")
ipc.main_quit()
sys.exit(0)