aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2017-05-06 15:41:42 +0200
committerAdrian Kummerlaender2017-05-06 15:50:10 +0200
commit8cbd4237a72c4a35cce9189e84ef8090bd486b22 (patch)
tree519f5a405d87f28b00ff334b9d3640ebb96cfca7
parent505761243109d3255a77dbaeb6d8e0a4f61eb045 (diff)
downloaddotfiles-8cbd4237a72c4a35cce9189e84ef8090bd486b22.tar
dotfiles-8cbd4237a72c4a35cce9189e84ef8090bd486b22.tar.gz
dotfiles-8cbd4237a72c4a35cce9189e84ef8090bd486b22.tar.bz2
dotfiles-8cbd4237a72c4a35cce9189e84ef8090bd486b22.tar.lz
dotfiles-8cbd4237a72c4a35cce9189e84ef8090bd486b22.tar.xz
dotfiles-8cbd4237a72c4a35cce9189e84ef8090bd486b22.tar.zst
dotfiles-8cbd4237a72c4a35cce9189e84ef8090bd486b22.zip
Switch SSH sessions from `screen` to `tmux`
-rw-r--r--bash/.bashrc4
-rw-r--r--tmux/.tmux.conf13
2 files changed, 14 insertions, 3 deletions
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