up
This commit is contained in:
+3
-8
@@ -1,10 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Skip lock if a fullscreen window is active (game, video, etc.)
|
||||
active=$(xprop -root _NET_ACTIVE_WINDOW 2>/dev/null | awk '{print $NF}')
|
||||
if [ -n "$active" ] && [ "$active" != "0x0" ]; then
|
||||
state=$(xprop -id "$active" _NET_WM_STATE 2>/dev/null)
|
||||
if echo "$state" | grep -q "_NET_WM_STATE_FULLSCREEN"; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
# Idle-blanking during fullscreen is suppressed by dpms-inhibit, so this
|
||||
# script (invoked by xss-lock) is only ever triggered for a real pre-suspend
|
||||
# lock — always lock, regardless of fullscreen state.
|
||||
exec ~/.config/i3/scripts/lock-now "$1"
|
||||
|
||||
Reference in New Issue
Block a user