scripts/sway/take_screenshot.sh

10 lines
306 B
Bash
Raw Normal View History

2022-04-03 22:54:40 +03:00
#!/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