10 lines
306 B
Bash
10 lines
306 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
MODE=$1
|
||
|
FILENAME=$(xdg-user-dir PICTURES)/$(date +%F_%T_grim.png)
|
||
|
|
||
|
case $MODE in "region-copy") grim -g "$(slurp)" - | wl-copy;;
|
||
|
"region") grim -g "$(slurp)" $FILENAME && notify-send -i "$FILENAME" "Screenshot saved";;
|
||
|
*) grim $FILENAME && notify-send -i "$FILENAME" "Screenshot saved";;
|
||
|
esac
|