Skip to content

Commit 97c4970

Browse files
chamlisOctopusET
authored andcommitted
Allow enabling global focus so only one window is opaque at a time
1 parent e3e8644 commit 97c4970

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

inactive-windows-transparency.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def on_window(args, ipc, event):
3333
window = tree.find_by_id(window_id)
3434
if window is None:
3535
to_remove.add(window_id)
36-
elif window.workspace() == focused_workspace:
36+
elif args.global_focus or window.workspace() == focused_workspace:
3737
window.command("opacity " + args.opacity)
3838
to_remove.add(window_id)
3939

@@ -65,6 +65,12 @@ def remove_opacity(ipc, focused_opacity):
6565
default="1.0",
6666
help="set focused opacity value in range 0...1",
6767
)
68+
parser.add_argument(
69+
"--global-focus",
70+
"-g",
71+
action="store_true",
72+
help="only have one opaque window across all workspaces",
73+
)
6874
args = parser.parse_args()
6975

7076
ipc = i3ipc.Connection()

0 commit comments

Comments
 (0)