diff options
-rwxr-xr-x | bin/lock-screen | 7 | ||||
-rwxr-xr-x | bin/permafocus | 17 |
2 files changed, 22 insertions, 2 deletions
diff --git a/bin/lock-screen b/bin/lock-screen index d784764..0dcfc61 100755 --- a/bin/lock-screen +++ b/bin/lock-screen @@ -1,17 +1,20 @@ #! /bin/bash main() { + clear + tty-clock -r -D -B -s -S - su $USER sh -c '' && (setxkbmap -rules /usr/share/X11/xkb/rules/evdev; dunstctl set-paused false; bspc wm -r) || main + su $USER sh -c '' && (setxkbmap -rules /usr/share/X11/xkb/rules/evdev; dunstctl set-paused false; bspc wm -r; bspc node -k) || main } trap "" 1 2 3 15 20 SIGTSTP +~/bin/permafocus `bspc query -N -n` & + xkbcomp ~/.local/bspwm-setup/lockscreen.xkb $DISPLAY 2>/dev/null killall -qw sxhkd polybar dunstctl set-paused true -bspc node -t fullscreen sleep 1 diff --git a/bin/permafocus b/bin/permafocus new file mode 100755 index 0000000..17d53fd --- /dev/null +++ b/bin/permafocus @@ -0,0 +1,17 @@ +#! /bin/bash + +bspc node -f $1 +bspc node $1 -t fullscreen +bspc node $1 -l above + +while [ -n "`bspc query -N -n $1`" ]; do + while [[ "`bspc query -N -n focused`" == "$1" ]]; do sleep 1; done + + bspc node -f $1 + bspc node $1 -t fullscreen + bspc node $1 -l above + + sleep 1 + + killall -9 su +done |