mirror of
https://gitlab.com/EternalWanderer/maim-utils
synced 2024-11-28 20:33:49 +01:00
fancy command
This commit is contained in:
parent
bfcdff9f1f
commit
ce8820ee79
27
maim-utils
27
maim-utils
|
@ -38,16 +38,36 @@ clip_focus(){
|
|||
notify-send 'Maim utils' "Shot focussed window and sent it to the clipboard."
|
||||
}
|
||||
|
||||
fancy(){
|
||||
# nicked straight from the maim README (https://github.com/naelstrof/maim#examples)
|
||||
maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage shadow.png
|
||||
notify-send 'Maim utils' "Shot selection and sent it to the clipboard.\nBe aware that the selection process can be cancelled using any keypress and that this won't show up due to xclip eating the exit status."
|
||||
}
|
||||
|
||||
usage(){
|
||||
cat >&2 <<EOF
|
||||
Usage: maim-utils <screenshot-type>
|
||||
|
||||
fullscreen|full: take screenshot of entire screen
|
||||
|
||||
selection|sel: take screenshot of rectangular selection
|
||||
|
||||
focus: take screenshot of focussed window
|
||||
clip-fullscreen|clip-full|full-clip: take screenshot of entire screen and output to clipboard
|
||||
clip-selection|clip-sel|sel-clip: take screenshot of rectangular selection and output to clipboard
|
||||
clip-focus|focus-clip: take screenshot of focussed window and output to clipboard
|
||||
|
||||
clip-fullscreen|clip-full|full-clip: take screenshot of entire screen and
|
||||
output to clipboard
|
||||
|
||||
clip-selection|clip-sel|sel-clip: take screenshot of rectangular selection
|
||||
and output to clipboard
|
||||
|
||||
clip-focus|focus-clip: take screenshot of focussed window and output to
|
||||
clipboard
|
||||
|
||||
clip-selection|clip-sel|sel-clip: take screenshot of rectangular selection
|
||||
and output to clipboard and give it a facy dropshadow
|
||||
|
||||
open|show|screenshots: open screenshot directory
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -59,5 +79,6 @@ case $1 in
|
|||
focus) focus;;
|
||||
clip-focus|focus-clip) clip_focus;;
|
||||
open|show|screenshots) xdg-open $savedir;;
|
||||
fancy) fancy;;
|
||||
*) usage;;
|
||||
esac
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#compdef maim-utils _maim-utils
|
||||
|
||||
_arguments -C \
|
||||
"1: :(focus fullscreen selection clip-selection clip-fullscreen clip-focus show)" \
|
||||
"1: :(focus fullscreen selection clip-selection clip-fullscreen clip-focus show fancy)" \
|
||||
"*::args:->args"
|
||||
_arguments : $arguments
|
||||
|
|
Loading…
Reference in a new issue