aboutsummaryrefslogtreecommitdiff
path: root/local/bin/screenshot-prompt
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2024-11-21 10:04:34 +0100
committerCharles Cabergs <me@cacharle.xyz>2024-11-21 10:05:04 +0100
commit59297cbd2a6a5c78f131e3b1a8c60710198f5213 (patch)
tree55af1f12903d58bb11556a9f18f46428b5d055d8 /local/bin/screenshot-prompt
parent01f55c6e0a6005bbb051246cd08af49e09fd137c (diff)
downloaddotfiles-59297cbd2a6a5c78f131e3b1a8c60710198f5213.tar.gz
dotfiles-59297cbd2a6a5c78f131e3b1a8c60710198f5213.tar.bz2
dotfiles-59297cbd2a6a5c78f131e3b1a8c60710198f5213.zip
Fixing shellcheck errors
Diffstat (limited to 'local/bin/screenshot-prompt')
-rwxr-xr-xlocal/bin/screenshot-prompt2
1 files changed, 2 insertions, 0 deletions
diff --git a/local/bin/screenshot-prompt b/local/bin/screenshot-prompt
index 6852eba..b320178 100755
--- a/local/bin/screenshot-prompt
+++ b/local/bin/screenshot-prompt
@@ -23,6 +23,7 @@ screenshot_dir="$HOME/screenshots"
[ ! -d "$screenshot_dir" ] && mkdir "$screenshot_dir"
scrot_wrapper() {
+ # shellcheck disable=SC2016
file_format="$screenshot_dir/"'%Y-%m-%d_$wx$h.png'
if [ "$1" = '-' ]
then
@@ -30,6 +31,7 @@ scrot_wrapper() {
shift
else
# optipng optimizes png size without loss (doesn't work if we output directly to stdout)
+ # shellcheck disable=SC2016
command -v optipng && optipng_arg='optipng -o4 $f'
fi
scrot --silent --quality 95 --compression 9 --file "$file_format" -e "$optipng_arg" "$@"