From c158c3f613eb7ae1f4f96fff53d73c5f30dbb466 Mon Sep 17 00:00:00 2001 From: thek4n Date: Mon, 3 Jun 2024 08:16:08 +0300 Subject: [PATCH] ref(tmux): remove commentaries from tmux config --- home/user/.config/tmux/mappings.conf | 26 +++++--------------------- home/user/.config/tmux/options.conf | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index 201a74d..81a85cd 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -18,7 +18,7 @@ bind -T off F12 { set status on } -## Toggle remote tmux mappings + bind F12 send-keys F12 @@ -32,25 +32,16 @@ bind n new-session -c ~ bind N command-prompt -p "New session:" "new-session -A -s '%1' -c ~" -# Kill session bind x confirm-before -p "kill current session? (y/n)" "kill-session" -# Kill last session bind X confirm-before -p "kill last session [#{client_last_session}]? (y/n)" "kill-session -t #{client_last_session} \; display-message \"Killed last session\"" -# Kill other sessions bind C-x confirm-before -p "kill other sessions? (y/n)" "kill-session -a" -# kill pane bind q confirm-before -p "kill current pane? (y/n)" "kill-pane" -# kill window bind Q kill-window -# Kill other windows bind C-q confirm-before -p "kill other windows? (y/n)" "kill-window -a" -# Detach 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" } { @@ -62,27 +53,24 @@ bind r command-prompt -I '#W' -p "New window name:" "rename-window '%%'" bind R command-prompt -I '#S' -p "New session name:" "rename-session '%%'" -# SSH Session bind H command-prompt -p "Remote host:" "new-session -s 'ssh-%1' -A ssh %1 \; set default-command 'ssh %1' \; set remain-on-exit on" -# Call prompt via prefix ; bind ';' command-prompt -# Zoom pane bind -n M-f resize-pane -Z -# Link window bind l choose-window -w -Z 'link-window -s "%%" -a' bind u unlink-window -# Join pane bind j choose-window -Z 'join-pane -s "%%"' -# Reload config +bind Tab switch-client -l + + bind F5 reload-config @@ -206,8 +194,4 @@ bind 6 run-shell ~/.tmux/06.sh bind 7 run-shell ~/.tmux/07.sh bind 8 run-shell ~/.tmux/08.sh bind 9 run-shell ~/.tmux/09.sh -bind 0 run-shell ~/.tmux/10.sh - - -# Switch to last session -bind Tab switch-client -l \ No newline at end of file +bind 0 run-shell ~/.tmux/10.sh \ No newline at end of file diff --git a/home/user/.config/tmux/options.conf b/home/user/.config/tmux/options.conf index 73956cd..8be06d6 100644 --- a/home/user/.config/tmux/options.conf +++ b/home/user/.config/tmux/options.conf @@ -3,28 +3,28 @@ _tmux_display_panes_time=4000 _tmux_display_time=450 -set -s exit-unattached off # Server will not exit if no attached clients -set -s exit-empty off # Server will not exit if no sessions +set -s exit-unattached off +set -s exit-empty off set -g detach-on-destroy off -set -g mouse on # Enable mouse support +set -g mouse on -set -s escape-time 0 # Delay after escape +set -s escape-time 0 set -g repeat-time 400 -set -g base-index 1 # Window numbering starts at 1 -set -g pane-base-index 1 # Pane numbering starts at 1 -set -g renumber-windows off # Off windows auto renumber +set -g base-index 1 +set -g pane-base-index 1 +set -g renumber-windows off -set -g history-limit 100000 # Scroll back history +set -g history-limit 100000 -setw -g aggressive-resize on # Resize windows on diff clients +setw -g aggressive-resize on set -g display-time $_tmux_display_time set -g display-panes-time $_tmux_display_panes_time -set -g lock-command vlock # Shell command to lock client +set -g lock-command vlock set -g focus-events on