From 8cbd4237a72c4a35cce9189e84ef8090bd486b22 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 6 May 2017 15:41:42 +0200 Subject: Switch SSH sessions from `screen` to `tmux` --- bash/.bashrc | 4 +--- tmux/.tmux.conf | 13 +++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 tmux/.tmux.conf diff --git a/bash/.bashrc b/bash/.bashrc index 50d8206..49dc3e3 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -4,9 +4,7 @@ host=`hostname` if [ $host = "automatix" ] || [ $host = "asterix" ]; then - if [ -z "$STY" ]; then - exec screen -R - fi + [ -z "$TMUX" ] && { tmux attach || exec tmux new && exit; } fi if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf new file mode 100644 index 0000000..7bad0c4 --- /dev/null +++ b/tmux/.tmux.conf @@ -0,0 +1,13 @@ +set -g default-terminal screen-256color + +set-window-option -g mode-keys vi + +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +bind-key -n C-h select-pane -L +bind-key -n C-j select-pane -D +bind-key -n C-k select-pane -U +bind-key -n C-l select-pane -R -- cgit v1.2.3