FollieHiyuki-dotfiles/home/.local/bin/Wayland/screenshot

35 lines
861 B
Plaintext
Raw Normal View History

2021-02-13 11:28:59 -05:00
#!/bin/sh
mkdir -p ~/Screenshots
SAVEPATH="$HOME/Screenshots/$(date +'%Y-%m-%d-%H%M%S_grim.png')"
case $1 in
--full)
grim "${SAVEPATH}"
notify-send -i $HOME/.config/mako/photograph.png "Screenshot taken..."
;;
--region)
GEOMETRY=$(slurp)
grim -g "${GEOMETRY}" "${SAVEPATH}"
notify-send -i $HOME/.config/mako/photograph.png "Screenshot taken..."
;;
--full-optional)
grim - | swappy -f -
;;
--region-optional)
GEOMETRY=$(slurp)
grim -g "${GEOMETRY}" - | swappy -f -
;;
--full-copy)
grim - | wl-copy
notify-send -i $HOME/.config/mako/photograph.png "Screenshot copied..."
;;
--region-copy)
GEOMETRY=$(slurp)
grim -g "${GEOMETRY}" - | wl-copy
notify-send -i $HOME/.config/mako/photograph.png "Screenshot copied..."
;;
*)
;;
esac