more readable

This commit is contained in:
Leaced 2023-03-24 18:14:27 +01:00 committed by GitHub
parent ca87965d92
commit 21b0a36fe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,13 +9,11 @@ all) #Screenshot of all outputs
grim -t jpeg -q 100 $FILENAME ;;
focus) # Screenshot of focused window
geometry="$(
geometry="$(echo $(
swaymsg -t get_tree |
grep -A 8 \"focused\"\:\ true |
grep -o "[0-9]*" |
awk '
BEGIN{ RS = "" ; FS = "\n" }
{printf "%d,%d %dx%d", $2+$1,$3+$1,$4-2*$1,$5-2*$1}')"
grep -o "[0-9]*") |
awk '{printf "%d,%d %dx%d", $2+$1,$3+$1,$4-2*$1,$5-2*$1}')"
grim -t jpeg -q 100 -g "$geometry" $FILENAME ;;
choice) #Screenshot von Auswahl