fix tmux kill
This commit is contained in:
parent
2e9c444e09
commit
4107446a1c
@ -62,17 +62,21 @@ bind n new-session -c ~
|
||||
# Switch new named session
|
||||
bind N command-prompt -p "New session:" "new-session -A -s '%1' -c ~"
|
||||
|
||||
bind x if-shell '[ "$(tmux display-message -p "#S")" != "landing" ]' \
|
||||
bind x if -F "#{?#{==:#{client_session},landing},0,1}" \
|
||||
"confirm-before -p \"kill current session? (y/n)\" kill-session" \
|
||||
"display-message 'Нельзя закрыть сессию landing'"
|
||||
"display-message 'Cannot kill session: landing'"
|
||||
|
||||
bind X confirm-before -p "kill last session [#{client_last_session}]? (y/n)" "kill-session -t #{client_last_session} \; display-message \"Killed last session\""
|
||||
bind X if -F "#{?#{==:#{client_last_session},landing},0,1}" \
|
||||
"confirm-before -p \"kill last session [#{client_last_session}]? (y/n)\" \"kill-session -t #{client_last_session} \\; display-message 'Killed last session'\"" \
|
||||
"display-message 'Cannot kill session: landing'"
|
||||
|
||||
bind C-x confirm-before -p "kill other sessions? (y/n)" "kill-session -a"
|
||||
bind q if -F "#{?#{==:#{client_session},landing},0,1}" \
|
||||
"confirm-before -p \"kill current pane? (y/n)\" kill-pane" \
|
||||
"display-message 'Cannot kill session: landing'"
|
||||
|
||||
bind q confirm-before -p "kill current pane? (y/n)" "kill-pane"
|
||||
bind Q confirm-before -p "kill current window? (y/n)" "kill-window"
|
||||
bind C-q confirm-before -p "kill other windows? (y/n)" "kill-window -a"
|
||||
bind Q if -F "#{?#{==:#{window_name},landing},0,1}" \
|
||||
"confirm-before -p \"kill current window? (y/n)\" kill-window" \
|
||||
"display-message 'Cannot kill session: landing'"
|
||||
|
||||
bind d detach
|
||||
bind D choose-client -Z
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user