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