1
0
forked from extern/nix-config

sxhkd: Add option to save selection screenshots

This commit is contained in:
Donovan Glover 2022-07-30 08:50:48 -04:00
parent 233cb01510
commit 5a3b02add8
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,9 @@
#!/bin/sh -e #!/bin/sh -e
DATETIME=`date +%F_%H%M%S` DATETIME=`date +%F_%H%M%S`
shotgun $(hacksaw -f "-i %i -g %g") - | xclip -t 'image/png' -selection clipboard
if [[ "$1" == "clipboard" ]]; then
shotgun $(hacksaw -f "-i %i -g %g") - | xclip -t 'image/png' -selection clipboard
else
shotgun $(hacksaw -f "-i %i -g %g") ~/$DATETIME.png
fi

View File

@ -10,8 +10,8 @@ super + p
~/.config/sxhkd/screenshot.sh ~/.config/sxhkd/screenshot.sh
# Screenshot a selection # Screenshot a selection
super + shift + p super + {shift,alt} + p
~/.config/sxhkd/selection.sh ~/.config/sxhkd/selection.sh {_,clipboard}
# Open a new terminal window # Open a new terminal window
super + {_,shift} + Return super + {_,shift} + Return