From cc6d6fcfc6e8403e87dae9f092e61f0edf8e3cc6 Mon Sep 17 00:00:00 2001 From: ryo Date: Wed, 30 Oct 2024 20:10:03 +0000 Subject: Initial commit --- bin/scshot.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 bin/scshot.sh (limited to 'bin/scshot.sh') diff --git a/bin/scshot.sh b/bin/scshot.sh new file mode 100755 index 0000000..e789c6e --- /dev/null +++ b/bin/scshot.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env dash + +sspath="$HOME/media" +ssname="$(date +"%F_%I%M").png" + +cd $sspath + +if [ "$1" = "a" ]; then + scrot $ssname +else + scrot -s $ssname +fi +if [ $? -ne 0 ]; then + dunstify -t 2000 "Screenshot aborted" + exit 0 +fi + +xclip -selection clipboard -t image/png $ssname + +sleep 1 +dunstify "Screenshot taked" "$sspath\n$ssname" -- cgit v1.2.3