From d8a1632afced46a63b49182c73efc8a3d89e84eb Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Mon, 27 Jun 2022 10:29:52 +0200 Subject: [PATCH] bin: update sway_lock to use currently focused output --- bin/sway_lock | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/sway_lock b/bin/sway_lock index f0c8976..4f9cc39 100755 --- a/bin/sway_lock +++ b/bin/sway_lock @@ -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