From ebd0c435f1b7efcd0de55031e2a14c513e8fc3d0 Mon Sep 17 00:00:00 2001 From: yemou Date: Sun, 07 Jan 2024 13:06:13 +0000 Subject: [PATCH] Remove quotes around $SLURP_ARGS. We want this environment variable to be split. --- scritps/colorgrab | 3 ++- scritps/scr | 6 ++++-- 2 file(s) changed, 6 insertion(s)(+), 3 deletion(s)(-) diff --git a/scritps/colorgrab b/scritps/colorgrab --- a/scritps/colorgrab +++ b/scritps/colorgrab @@ -61,7 +61,8 @@ [ "$color_type" ] || color_type="hex" # Get a screenshot of the pixel -grim -s 1 -g "$(slurp "${SLURP_ARGS}" -b 00000000 -s 00000000 -w -1 -p)" "/tmp/${0##*/}/temp.png" +# shellcheck disable=SC2086 +grim -s 1 -g "$(slurp ${SLURP_ARGS} -b 00000000 -s 00000000 -w -1 -p)" "/tmp/${0##*/}/temp.png" case $color_type in hex ) color=$(convert "/tmp/${0##*/}/temp.png" -format "%[hex:p]\n" info:) ;; diff --git a/scritps/scr b/scritps/scr --- a/scritps/scr +++ b/scritps/scr @@ -157,7 +157,8 @@ grim "$filename" > "$SCR_CACHE_DIR/pic.log" 2>&1 else # Get the geometry of the screenshot from the user and take the screenshot - if [ "$output" ]; then set -- -o "$output"; else set -- -g "$(slurp "${SLURP_ARGS}")"; fi + # shellcheck disable=SC2086 + if [ "$output" ]; then set -- -o "$output"; else set -- -g "$(slurp ${SLURP_ARGS})"; fi grim "$@" "$filename" > "$SCR_CACHE_DIR/pic.log" 2>&1 fi @@ -197,7 +198,8 @@ # Intercept Ctrl+C and exit wf-recorder instead of the script trap '' INT - if [ "$output" ]; then set -- -o "$output"; else set -- -g "$(slurp "${SLURP_ARGS}")"; fi + # shellcheck disable=SC2086 + if [ "$output" ]; then set -- -o "$output"; else set -- -g "$(slurp ${SLURP_ARGS})"; fi # Word splitting is favorable here # shellcheck disable=SC2086 wf-recorder $args $rec_extraflags "$@" -f "$filename" > "$SCR_CACHE_DIR/rec.log" 2>&1 & -- tangled.sh