Add --force_area option to screenshot script
Also bind this option in sxhkd.
This commit is contained in:
parent
b9e5ed6e27
commit
bb20ed4d7c
@ -11,12 +11,12 @@ super + c
|
||||
|
||||
super + s; {t,m,n,v}
|
||||
{tuirent,mails,rss,fm}
|
||||
super + a; {g,k,l,i,k}
|
||||
{gimp,keepassxc,libreoffice,inkscape,keepassxc}
|
||||
super + a; {g,k,l,i}
|
||||
{gimp,keepassxc,libreoffice,inkscape}
|
||||
|
||||
super + m
|
||||
rofi-mpd -a
|
||||
super + x
|
||||
{Prior,super + x}
|
||||
slock
|
||||
super + z
|
||||
powermenu
|
||||
@ -29,8 +29,8 @@ super + {_,shift +} e
|
||||
super + w
|
||||
choosewall
|
||||
|
||||
{_,shift +} Print
|
||||
screenshot {_,--force}
|
||||
{_,shift,ctrl +} Print
|
||||
screenshot {_,--force,--force_area}
|
||||
{_,shift +} F1
|
||||
{_,u}mounter
|
||||
{_,ctrl +} F10
|
||||
|
@ -12,7 +12,13 @@ screenshot() {
|
||||
notify-send -u low -t 1400 -i "$screen_path" "Screenshot created!"
|
||||
}
|
||||
|
||||
[ "$1" = "--force" ] && { screenshot && exit; }
|
||||
clip() {
|
||||
xclip -sel clip /dev/null; sleep 0.5
|
||||
xclip -selection clipboard -t image/png "$screen_path"
|
||||
}
|
||||
|
||||
[ "$1" = "--force" ] && { screenshot; exit; }
|
||||
[ "$1" = "--force_area" ] && { type="-s -u" && screenshot && clip; exit ;}
|
||||
|
||||
type="$(printf " Screen\n Area\n" | m 2 -p 'Screenshoter')"
|
||||
[ ! "$type" ] && exit
|
||||
@ -26,6 +32,4 @@ time="$(printf "0.7\n5\n10\n15" | m 3 -p 'Delay')"
|
||||
sleep "$time"
|
||||
screenshot
|
||||
|
||||
[ "$save" = " Yes" ] &&
|
||||
xclip -sel clip /dev/null; sleep 0.5
|
||||
xclip -selection clipboard -t image/png "$screen_path" || exit
|
||||
[ "$save" = " Yes" ] && clip || exit
|
||||
|
Loading…
x
Reference in New Issue
Block a user