From 610d51b918d21203238209e8fc272854d06784c1 Mon Sep 17 00:00:00 2001 From: andreasnilsson80 Date: Thu, 2 Oct 2025 17:57:23 +0200 Subject: [PATCH] add tmux config --- .tmux.conf | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .tmux.conf diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..0b47791 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,43 @@ +# Similar to screen (C-a C-a) +bind-key C-b last-window + +# Use colors the same way as screen does +set -g default-terminal "screen-256color" + +# Don't wait for escape sequences +set -s escape-time 0 + +# Enable mouse scrolling +set -g mouse on + + +# Use vi style bindings +set-window-option -g mode-keys vi + +# Move around panes with ALT + arrow keys. +bind-key -n M-Up select-pane -U +bind-key -n M-Left select-pane -L +bind-key -n M-Down select-pane -D +bind-key -n M-Right select-pane -R + +# Split panes. +bind-key h split-window -v -c "#{pane_current_path}" +bind-key v split-window -h -c "#{pane_current_path}" +bind-key C-h split-window -v -c "#{pane_current_path}" +bind-key C-v split-window -h -c "#{pane_current_path}" + +# Resize panes with C-a + ALT + arrow keys +bind-key M-Up resize-pane -U 10 +bind-key M-Left resize-pane -L 10 +bind-key M-Down resize-pane -D 10 +bind-key M-Right resize-pane -R 10 + +# Automatically set window title +set-window-option -g automatic-rename on +set-option -g set-titles on + +set-option -g status-left-length 40 +set-option -g status-left "#{pane_current_path} |" +set-option -g status-style fg=brightyellow,bg=black +set-option -g status-right "#(id -nu)@#h | %Y-%m-%d | %H:%M" +