diff options
Diffstat (limited to '.config/bash/functions.sh')
-rw-r--r-- | .config/bash/functions.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.config/bash/functions.sh b/.config/bash/functions.sh index 34bd71b..9e8ac83 100644 --- a/.config/bash/functions.sh +++ b/.config/bash/functions.sh @@ -1,5 +1,10 @@ max() { [[ $# -eq 2 ]] && ( [[ $1 -ge $2 ]] && echo $1 || echo $2 ) } +# param: width = $1, height = $2 +resize() { + printf "\e[8;%d;%dt" $2 $1 +} + resize_to_min() { # eval $(resize -s $(max $LINES $2) $(max $COLUMNS $1)) printf "\e[8;%d;%dt" $(max $LINES $2) $(max $COLUMNS $1) |