feat(tmux): mappings
This commit is contained in:
parent
4cdccc56c5
commit
1c0dfeb470
@ -30,15 +30,16 @@ bind n command-prompt -p "New session:" "new-session -A -d -s '%1' -c ~ \; switc
|
||||
|
||||
# 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 session and reattach to last session
|
||||
bind x confirm-before -p "kill current session? (y/n)" "switch-client -l \; kill-session -t '#S'"
|
||||
|
||||
# Kill other windows
|
||||
bind C-x confirm-before -p "kill other windows? (y/n)" "kill-window -a"
|
||||
|
||||
# kill pane
|
||||
bind k confirm-before -p "kill current pane? (y/n)" "kill-pane"
|
||||
bind q confirm-before -p "kill current pane? (y/n)" "kill-pane"
|
||||
# kill window
|
||||
bind Q confirm-before -p "kill current window? (y/n)" "kill-window"
|
||||
|
||||
# Kill other windows
|
||||
bind C-q confirm-before -p "kill other windows? (y/n)" "kill-window -a"
|
||||
|
||||
|
||||
# SSH Session
|
||||
@ -56,7 +57,7 @@ bind -n M-f resize-pane -Z
|
||||
# Link window
|
||||
bind L command-prompt -p "Link window from (session:window):" "link-window -s %% -a"
|
||||
|
||||
# Link pane
|
||||
# Join pane
|
||||
bind C-l command-prompt -p "Join pane from (session:window.pane):" "join-pane -s %%"
|
||||
|
||||
|
||||
@ -76,11 +77,18 @@ bind -n M-j select-pane -D
|
||||
bind -n M-k select-pane -U
|
||||
|
||||
|
||||
|
||||
# Sync panes
|
||||
bind o setw synchronize-panes on
|
||||
bind o if -F '#{pane_synchronized}' 'setw synchronize-panes off' 'setw synchronize-panes on'
|
||||
bind O setw synchronize-panes off
|
||||
|
||||
|
||||
# Detach
|
||||
bind D if -F '#{session_many_attached}' \
|
||||
'confirm-before -p "Detach other clients? (y/n)" "detach -a"' \
|
||||
'display "Session has only 1 client attached"'
|
||||
|
||||
|
||||
# Windows navigation
|
||||
bind -n M-p previous-window
|
||||
bind -n M-n next-window
|
||||
|
||||
@ -23,6 +23,7 @@ set -g default-terminal "xterm-256color"
|
||||
set -ga terminal-overrides ",xterm-256color:Tc"
|
||||
|
||||
set-hook -g after-new-window[101] 'rename-window -t 1 1'
|
||||
set-hook -g after-new-session[101] 'rename-window -t 1 1'
|
||||
|
||||
set -ga update-environment 'DISPLAY'
|
||||
set -ga update-environment 'WINDOWID'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user