bin: update sway_lock to use currently focused output

This commit is contained in:
Konstantin Koslowski 2022-06-27 10:29:52 +02:00
parent fad2310f6e
commit d8a1632afc

View file

@ -1,10 +1,11 @@
#!/bin/bash
source $HOME/.config/sway/bin/sway_helpers
IMAGE=$HOME/.lockscreen.jpg
IMAGE=$HOME/.lockscreen.png
LOCK_IMAGE=$HOME/.config/sway/bin/lock.png
OUTPUT=$(swaymsg -t get_outputs -p | grep focused | cut -d " " -f 2)
MEDIA_APP=playerctl
SCROT_APP=grim
SCROT_ARGS=" -t jpeg"
SCROT_ARGS=" -o $OUTPUT -t png"
LOCK_APP=swaylock
LOCK_ARGS=" -f -F -e -c 000000 --indicator-radius 100 --indicator-thickness 20 -i $IMAGE"
INHIBIT_FILE=$HOME/.inhibit_lock
@ -47,11 +48,11 @@ case "$1" in
_on
_screenshot
_lock
# _clean
_clean
;;
lockonly)
_lock
# _clean
_clean
;;
off)
_screenshot
@ -59,7 +60,7 @@ case "$1" in
;;
on)
_on
# _clean
_clean
;;
screenshot)
_on