diff --git a/maim-utils b/maim-utils index 13ec0ad..ffdf687 100755 --- a/maim-utils +++ b/maim-utils @@ -38,12 +38,18 @@ clip_focus(){ notify-send 'Maim utils' "Shot focussed window and sent it to the clipboard." } -fancy(){ +fancy_clip(){ # 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 PNG:- | xclip -sel clip -t image/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." } +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 "$filename" + 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 < @@ -80,5 +86,6 @@ case $1 in clip-focus|focus-clip) clip_focus;; open|show|screenshots) xdg-open $savedir;; fancy) fancy;; + fancy-clip) fancy_clip;; *) usage;; esac diff --git a/maim-utils.1.scd b/maim-utils.1.scd index 5142d8c..f3e9220 100644 --- a/maim-utils.1.scd +++ b/maim-utils.1.scd @@ -6,9 +6,9 @@ maim-utils - A few common screenshot options rolled into one script based on mai # SYNOPSIS -*maim-utils* __ +*maim-utils* __ -*maim-utils* __ +*maim-utils* __ # DESCRIPTION @@ -36,6 +36,10 @@ This can be changed by setting the *$SCROTDIR* environment variable. Take a screenshot of the currently focussed window and save it to the screenshot directory. +*fancy* + Take a screenshot of a window and add a fancy looking dropshadow effect + using imagemagick. + *clip-fullscreen*, *clip-full* and *full-clip* Take a screenshot of the entire screen and write it to the clipboard. @@ -43,6 +47,10 @@ This can be changed by setting the *$SCROTDIR* environment variable. Take a screenshot of the currently focus window and write it to the clipboard. +*fancy-clip* + Take a screenshot of a window, add a fancy looking dropshadow effect + using imagemagick and write it to the clipboard. + *clip-selection*, *clip-sel* and *sel-clip* Take a screenshot based on a rectangular selection and write it to the clipboard. diff --git a/zsh.completion b/zsh.completion index 0d038f8..a659441 100644 --- a/zsh.completion +++ b/zsh.completion @@ -1,6 +1,6 @@ #compdef maim-utils _maim-utils _arguments -C \ - "1: :(focus fullscreen selection clip-selection clip-fullscreen clip-focus show fancy)" \ + "1: :(focus fullscreen selection clip-selection clip-fullscreen clip-focus show fancy fancy-clip)" \ "*::args:->args" _arguments : $arguments