add screenshot script
This commit is contained in:
parent
8a775d758f
commit
d6f713d117
|
@ -29,9 +29,9 @@ super + Escape
|
||||||
$HOME/.config/bspwm/bspwmrc reload
|
$HOME/.config/bspwm/bspwmrc reload
|
||||||
|
|
||||||
Print
|
Print
|
||||||
$SCRIPTS/screenshot/ssall
|
$SCRIPTS/screenshot/ss
|
||||||
super + shift + s
|
super + shift + s
|
||||||
$SCRIPTS/screenshot/ssregion
|
$SCRIPTS/screenshot/ss -Dosu
|
||||||
|
|
||||||
#
|
#
|
||||||
# bspwm hotkeys
|
# bspwm hotkeys
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# take a screenshot of a region selected by the cursor and copy it to the clipboard
|
||||||
|
# using maim and xclip
|
||||||
|
|
||||||
|
# accept all passed arguments and pass them to maim
|
||||||
|
maimflags="$@"
|
||||||
|
|
||||||
|
dir="$(xdg-user-dir PICTURES)/ss"
|
||||||
|
file="$dir/$(date +%s).png"
|
||||||
|
|
||||||
|
# create screenshot dir if it doesn't exist
|
||||||
|
[ -d $dir ] || mkdir -p $dir
|
||||||
|
|
||||||
|
# save screenshot to a file with a unique ordered timestamp
|
||||||
|
maim $maimflags $file
|
||||||
|
|
||||||
|
# copy the file to the clipboard
|
||||||
|
xclip -selection clipboard -target image/png $file
|
Loading…
Reference in New Issue