Merge branch 'master' of github.com:Jab2870/dotfiles

This commit is contained in:
Jonathan Hodgson 2019-05-08 11:22:48 +01:00
commit 29fe109101
8 changed files with 77 additions and 46 deletions

19
bin/screenshot Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
# A simple wrapper around scrot
#
# When run, the screenshot will be added to she clipboard
case $1 in
"window")
file=$(scrot -u '/tmp/%F_%T_$wx$h.png' -e 'echo /tmp/%F_%T_$wx$h.png')
;;
"select")
file=$(sleep 0.2; scrot -s '/tmp/%F_%T_$wx$h.png' -e 'echo /tmp/%F_%T_$wx$h.png')
;;
*)
file=$(scrot '/tmp/%F_%T_$wx$h.png' -e 'echo /tmp/%F_%T_$wx$h.png')
;;
esac
xclip -selection clipboard -target image/png -i "$file"