From 6f396db4542e212f82804369fef5b5a9602113d1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 22:38:40 +0100 Subject: [PATCH] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index a95def1..4088bbf 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -127,45 +127,42 @@ set-option -g status-position top # │ key │ # ╰─────╯ -# select sessions with Alt & ↑ | ↓ +# detach client +bind-key -n F6 detach-client + +# new window +bind-key -n F2 new-window + +# select pane +bind-key -n C-S-Down select-pane -D +bind-key -n C-S-Left select-pane -L +bind-key -n C-S-Right select-pane -R +bind-key -n C-S-Up select-pane -U + +# switch session bind-key -n M-Down switch-client -n bind-key -n M-Up switch-client -p +# switch window +bind-key -n M-Left previous-window +bind-key -n M-Right next-window + # ╭─────┬────────╮ # │ key │ prefix │ # ╰─────┴────────╯ +# split window +bind-key h split-window -h +bind-key v split-window -v + # reload configuration bind-key r source-file ${file} \\; display-message 'source-file ${file}' # toggle mouse bind-key t set-option -g mouse \\; display-message 'mouse = #{mouse}' -# ╭─╮ -# ╰─╯ - -# bind key to detach client -bind-key -n F6 detach-client - -# swap window with next or previous +# swap window bind-key M-Left swap-window -t -1 bind-key M-Right swap-window -t +1 - -# create new window with F2 -bind-key -n F2 new-window -# previous or next window with Alt & ← | → -bind-key -n M-Left previous-window -bind-key -n M-Right next-window - -# select panes with Ctrl & Shift & ←↑↓→ -bind-key -n C-S-Down select-pane -D -bind-key -n C-S-Left select-pane -L -bind-key -n C-S-Right select-pane -R -bind-key -n C-S-Up select-pane -U - -# horizontal split with H -bind-key h split-window -h -# vertical split with V -bind-key v split-window -v " }