From 2373ef061a6fd38707f17d4b7bee803488d371a3 Mon Sep 17 00:00:00 2001 From: orejav Date: Mon, 13 Nov 2023 22:37:09 +0200 Subject: [PATCH] starter tmux config --- .tmux.conf | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .tmux.conf diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..e1c909f --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,30 @@ +# set Ctrl+a as the prefix +set -g prefix C-a +unbind C-b +bind C-a send-prefix + +# set split panes using Alt+\ for horizontal and Alt+- for vertical +bind -n M-\= split-window -h +bind -n M-\- split-window -v +unbind '"' +unbind % + +# switch panes using Ctrl-Alt-arrow without prefix +bind -n C-M-Left select-pane -L +bind -n C-M-Right select-pane -R +bind -n C-M-Up select-pane -U +bind -n C-M-Down select-pane -D + +# resize panes using Alt-Shift-H/J/K/L without prefix +bind -n M-H resize-pane -L 2 +bind -n M-L resize-pane -R 2 +bind -n M-J resize-pane -U 2 +bind -n M-K resize-pane -D 2 + +# set "a" key to toggle broadcasting to all panes +bind a setw synchronize-panes +setw -g window-status-current-format '#{?pane_synchronized,#[bg=red],}#I:#W' +setw -g window-status-format '#{?pane_synchronized,#[bg=red],}#I:#W' + +# mouse mode (shift + left click selection to copy, shift + right click to paste) +set -g mouse on