new screenshot menu
new screenshot menu
This commit is contained in:
parent
a6628ff3cc
commit
1a46c273f2
2 changed files with 25 additions and 3 deletions
24
.local/bin/dmenuflameshot
Executable file
24
.local/bin/dmenuflameshot
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
# this script provides a menu of screenshot options, using flameshot
|
||||
|
||||
geom() {
|
||||
case $1 in
|
||||
"active") eval "$(xdotool getactivewindow getwindowgeometry --shell)" ;;
|
||||
"select") eval "$(xdotool selectwindow getwindowgeometry --shell)" ;;
|
||||
esac
|
||||
echo "${WIDTH}x${HEIGHT}+${X}+${Y}"
|
||||
}
|
||||
|
||||
# variables
|
||||
output="${XDG_PICTURES_DIR:-$HOME/Pictures}/$(date '+%y%m%d-%H%M-%S').png"
|
||||
case "$(printf "selected area\\ncurrent window\\nselected window\\nfull screen\\nselected area (copy)\\ncurrent window (copy)\\nselect window (copy)\\nfull screen (copy)" | dmenu -i -p "Screenshot which area?")" in
|
||||
"selected area") flameshot gui -p "$output" ;;
|
||||
"current window") flameshot gui -p "$output" --region "$(geom active)";;
|
||||
"selected window") flameshot gui -p "$output" --region "$(geom select)";;
|
||||
"full screen") flameshot full -p "$output" ;;
|
||||
"selected area (copy)") flameshot gui -c ;;
|
||||
"current window (copy)") flameshot gui -p "$output" -c --region "$(geom active)";;
|
||||
"selected window (copy)") flameshot gui -p "$output" -c --region "$(geom select)";;
|
||||
"full screen (copy)") flameshot full -c ;;
|
||||
esac
|
|
@ -1,8 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This is bound to Shift+PrintScreen by default, requires maim. It lets you
|
||||
# choose the kind of screenshot to take, including copying the image or even
|
||||
# highlighting an area to copy. scrotcucks on suicidewatch right now.
|
||||
# this script provides a menu of screenshot options, using maim
|
||||
|
||||
# variables
|
||||
output="$(date '+%y%m%d-%H%M-%S').png"
|
Loading…
Add table
Reference in a new issue