tmux: bind tmux-session-menu
This commit is contained in:
parent
29608ff8c4
commit
d6ba2a78b9
@ -12,7 +12,7 @@ bind-key -n M-6 select-window -t 6
|
||||
bind-key -n M-7 select-window -t 7
|
||||
bind-key -n M-8 select-window -t 8
|
||||
bind-key -n M-9 select-window -t 9
|
||||
bind-key -n M-0 select-window -t 10
|
||||
#bind-key -n M-0 select-window -t 10
|
||||
|
||||
bind-key -n M-! swap-window -t 1
|
||||
bind-key -n M-@ swap-window -t 2
|
||||
@ -83,3 +83,5 @@ bind-key -T copy-mode-vi C-M-h swap-pane -s "{left-of}"
|
||||
bind-key -T copy-mode-vi C-M-j swap-pane -s "{down-of}"
|
||||
bind-key -T copy-mode-vi C-M-k swap-pane -s "{up-of}"
|
||||
bind-key -T copy-mode-vi C-M-l swap-pane -s "{right-of}"
|
||||
|
||||
bind-key -n M-0 run-shell tmux-session-menu
|
||||
|
5
tmux/bin/tmux-session-menu
Executable file
5
tmux/bin/tmux-session-menu
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
tmux list-sessions -F '#S' \
|
||||
| awk 'BEGIN {ORS=" "; print "toggle t \"switch-client -l\""} {print $1, NR, "\"switch-client -t", $1 "\""}' \
|
||||
| xargs tmux display-menu -T "Switch session"
|
Loading…
x
Reference in New Issue
Block a user