diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-02 10:44:32 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-02 10:44:32 +0200 |
commit | e7cc98818fd10d4acb230df7a9f7a0c6afb74247 (patch) | |
tree | 9f7fad73706a7c74545061a76e36cee8b4aebb55 /config/essentials/zsh | |
parent | ad799ff689fd57f0ab09ed2287241ba7607b0d00 (diff) |
added resize function
Diffstat (limited to 'config/essentials/zsh')
-rw-r--r-- | config/essentials/zsh/functions.zsh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index ada523d..671e6fb 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -278,3 +278,11 @@ muttmail () die -n 'Press [Enter to login]' read && mutt } + +resize () +{ + test $# -lt 2 && + printf "usage: %s <format> <file> [out]\n" "$0" >&2 && + return 1 + convert -resize $1^ -gravity center -crop $1+0+0 -- "$2" "${3:-$1}" +} |