mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
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:
parent
6b97c4fa71
commit
634944c566
1 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue