mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-12 01:42:02 +01:00
15 lines
571 B
Bash
Executable file
15 lines
571 B
Bash
Executable file
#!/bin/sh
|
|
|
|
OPT="${1:-screen}"
|
|
|
|
case "$OPT" in
|
|
screen)
|
|
scrot '/tmp/%F_%T_$wx$h.png' -e 'mkdir -p ~/screenshot/ ; mv $f ~/screenshot ; xclip -selection clipboard -target image/png -i ~/screenshot/`basename $f`'
|
|
;;
|
|
select)
|
|
scrot '/tmp/%F_%T_$wx$h.png' -s -e 'mkdir -p ~/screenshot/ ; mv $f ~/screenshot ; xclip -selection clipboard -target image/png -i ~/screenshot/`basename $f`'
|
|
;;
|
|
focused)
|
|
scrot '/tmp/%F_%T_$wx$h.png' -f -e 'mkdir -p ~/screenshot/ ; mv $f ~/screenshot ; xclip -selection clipboard -target image/png -i ~/screenshot/`basename $f`'
|
|
;;
|
|
esac
|