diff options
-rw-r--r-- | .config/bash/alias.sh | 3 | ||||
-rw-r--r-- | .config/bash/functions.sh | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/.config/bash/alias.sh b/.config/bash/alias.sh index 7299b6b..eef3f17 100644 --- a/.config/bash/alias.sh +++ b/.config/bash/alias.sh @@ -10,8 +10,7 @@ alias lh="ls -d .[^.]*" alias la="ls -a" # resizing terminal -alias r="resize_to_min 100 35" -alias s="resize 60 17" +alias s="r 60 17" # resize terminal before launching curses-apps alias vim="r; vim" diff --git a/.config/bash/functions.sh b/.config/bash/functions.sh index dc49e58..06547ed 100644 --- a/.config/bash/functions.sh +++ b/.config/bash/functions.sh @@ -24,6 +24,16 @@ resize_to_min() { printf "\e[8;%d;%dt" $(max $LINES $2) $(max $COLUMNS $1) } +function r() { + if [ $# -ge 2 ]; then + resize $1 $2 + elif [ $# -ge 1 ]; then + resize $1 $LINES + else + resize_to_min 100 35 + fi +} + nh() { nohup "$@" &> /dev/null & } |