[dwm] feat: add screenshot script + keymap

This commit is contained in:
David JULIEN 2022-05-01 18:37:27 +02:00
parent fb9ea761df
commit 0cb56c9a46
2 changed files with 13 additions and 0 deletions

View File

@ -50,6 +50,9 @@ super + shift + Return
super + d
dmenu_run -p "run:"
super + p
screenshot
super + shift + {w,z}
$BROWSER

10
.local/bin/screenshot Executable file
View File

@ -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