ref(tmux): remove commentaries from tmux config

This commit is contained in:
thek4n 2024-06-03 08:16:08 +03:00
parent 2663e165bc
commit c158c3f613
2 changed files with 15 additions and 31 deletions

View File

@ -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
@ -207,7 +195,3 @@ 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

View File

@ -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