From 634f0dee30a3392a2cc8c8f9f48fbaa3d7af9837 Mon Sep 17 00:00:00 2001 From: thek4n Date: Mon, 27 May 2024 13:29:06 +0300 Subject: [PATCH] ref(tmux) --- home/user/.config/tmux/mappings.conf | 30 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index 124f2c1..e6ca1d0 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -6,15 +6,17 @@ bind C-b send-prefix # Toggle local tmux mappings to allow control remote tmux -bind -T root F12 \ - set prefix None \;\ - set key-table off \;\ +bind -T root F12 { + set prefix None + set key-table off set status off +} -bind -T off F12 \ - set -u prefix \;\ - set -u key-table \;\ +bind -T off F12 { + set -u prefix + set -u key-table set status on +} ## Toggle remote tmux mappings bind F12 send-keys F12 @@ -49,9 +51,12 @@ bind d detach # Choose client to detach bind D choose-client -Z # Detach other clients -bind C-d if -F '#{session_many_attached}' \ - 'confirm-before -p "Detach other clients? (y/n)" "detach -a"' \ - 'display "Session has only 1 client attached"' +bind C-d if -F '#{session_many_attached}' { + confirm-before -p "Detach other clients? (y/n)" "detach -a" +} { + display "Session has only 1 client attached" +} + bind r command-prompt -I '#W' -p "New window name:" "rename-window '%%'" @@ -108,7 +113,12 @@ bind o if -F '#{pane_synchronized}' 'setw synchronize-panes off' 'setw synchroni bind O setw synchronize-panes off -bind i "set -g display-time $_tmux_display_panes_time \; display-message \; display-panes \; set -g display-time $_tmux_display_time" +bind i { + set -g display-time $_tmux_display_panes_time + display-message + display-panes + set -g display-time $_tmux_display_time +} # Windows navigation