From 634944c566df3d3a5619997aab8ad95dde5d955f Mon Sep 17 00:00:00 2001 From: Ankit Pandey Date: Sat, 16 Jul 2022 18:00:51 -0700 Subject: [PATCH] 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. --- contrib/inactive-windows-transparency.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/inactive-windows-transparency.py b/contrib/inactive-windows-transparency.py index b81134dd4..7727c5e64 100755 --- a/contrib/inactive-windows-transparency.py +++ b/contrib/inactive-windows-transparency.py @@ -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)