diff options
Diffstat (limited to 'bin/lock')
-rwxr-xr-x | bin/lock | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1,11 +1,20 @@ #! /bin/bash +refocus_fullscreen_nodes() { + while [ -e "$(pgrep -x permafocus)" ]; do sleep 1; done + + for NODE in ${FULLSCREEN_NODES}; do + bspc node ${NODE} -t fullscreen + done +} + if [ $(pgrep -x lock | wc -l) -gt 2 ]; then # Starting multiple screen lock instances may cause unintended side effects exit 0 fi FOCUSED_MONITOR=$(bspc query -M -m) +FULLSCREEN_NODES=$(bspc query -N -n any.fullscreen) bspc monitor -f 1 ~/.local/kitty.app/bin/kitty \ @@ -25,6 +34,8 @@ if [ -n "$(xrandr --listmonitors | grep 'DP-2')" ]; then SECONDARY_WINDOW=$(bspc query -N -n) fi +refocus_fullscreen_nodes & + ~/bin/permafocus ${PRIMARY_WINDOW} ${SECONDARY_WINDOW} bspc node ${PRIMARY_WINDOW} -k |