summaryrefslogtreecommitdiff
path: root/.local/bin/scst
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/scst')
-rwxr-xr-x.local/bin/scst16
1 files changed, 7 insertions, 9 deletions
diff --git a/.local/bin/scst b/.local/bin/scst
index d1ad54a..51b00c1 100755
--- a/.local/bin/scst
+++ b/.local/bin/scst
@@ -2,9 +2,12 @@
set -e
+export NOTIFY_LONG=screenshot
+export NOTIFY_SHORT="${0##*/}"
+
xnotify()
{
- notify ${0##*/} screenshot 'Screenshot Copied' \
+ notify 'Screenshot Copied' \
'Screenshot successfully copied to the clipboard' \
-i "$filename"
}
@@ -35,10 +38,7 @@ fi
[ -f "$filename" ] || exit 1
-opt="$(
- printf 'Copy screenshot\nEdit- and copy screenshot\n' \
- | { osel || true; }
-)"
+opt="$(printf 'Copy screenshot\nEdit- and copy screenshot\n' | { osel || true; })"
case "$opt" in
'Copy screenshot')
@@ -46,13 +46,11 @@ case "$opt" in
xnotify
;;
'Edit- and copy screenshot')
- swappy -f "$filename" -o - \
- | pee wl-copy cat \
- | sponge "$filename"
+ swappy -f "$filename" -o - | pee wl-copy cat | sponge "$filename"
xnotify
;;
*)
- notify ${0##*/} screenshot 'Screenshot Saved' \
+ notify 'Screenshot Saved' \
"The screenshot ‘$filebase’ was successfully saved" \
-i "$filename"
esac