diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 687ef73..0538d1f 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -50,6 +50,9 @@ super + shift + Return super + d dmenu_run -p "run:" +super + p + screenshot + super + shift + {w,z} $BROWSER diff --git a/.local/bin/screenshot b/.local/bin/screenshot new file mode 100755 index 0000000..8c4c684 --- /dev/null +++ b/.local/bin/screenshot @@ -0,0 +1,10 @@ +#!/usr/bin/env sh +if [ "-w" = "$1" ]; then + scrot -e 'xclip -selection clipboard -t image/png -i $f && rm $f' +else + if [ ! "" = "$1" ]; then + dunstify -u "normal" " Wrong parameter. No screenshot taken" && exit 1 + else + scrot -s -e 'xclip -selection clipboard -t image/png -i $f && rm $f' + fi +fi