Fixed fullscreen inhibitor
This commit is contained in:
parent
0bb20e93b0
commit
407c93c90d
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Get all open windows from sway
|
# Get all open windows from sway
|
||||||
IN_FULLSCREEN=$(swaymsg -t get_tree | jq '[[recurse(.nodes[]) | del(.nodes)] | .[] | select((.window_properties.class) or (.app_id)) | {app_id: .app_id, class: .window_properties.class, fullscreen_mode: .fullscreen_mode}]' | jq 'any(.fullscreen_mode == 1)')
|
IN_FULLSCREEN_NODES=$(swaymsg -t get_tree | jq '[paths(objects | select(.nodes)) as $p | getpath($p) | select((.window_properties.class) or (.app_id)) | {name: .name, app_id: .app_id, class: .window_properties.class, fullscreen_mode: .fullscreen_mode, focused: .focused}]' | jq 'any(.fullscreen_mode == 1)')
|
||||||
|
IN_FULLSCREEN_FLOATING_NODES=$(swaymsg -t get_tree | jq '[paths(objects | select(.floating_nodes)) as $p | getpath($p) | select((.window_properties.class) or (.app_id)) | {name: .name, app_id: .app_id, class: .window_properties.class, fullscreen_mode: .fullscreen_mode, focused: .focused}]' | jq 'any(.fullscreen_mode == 1)')
|
||||||
|
|
||||||
if [ $IN_FULLSCREEN = "true" ]; then
|
if [ $IN_FULLSCREEN_NODES = "true" ] || [ $IN_FULLSCREEN_FLOATING_NODES = "true" ]; then
|
||||||
dunstctl set-paused true
|
dunstctl set-paused true
|
||||||
else
|
else
|
||||||
dunstctl set-paused false
|
dunstctl set-paused false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user