2023-12-10 21:22:07 +00:00
|
|
|
# tmux_binds.conf
|
|
|
|
|
|
|
|
# Binds
|
|
|
|
bind-key 'x' kill-pane
|
|
|
|
bind-key 'h' previous-window
|
|
|
|
bind-key 'j' switch-client -p
|
|
|
|
bind-key 'k' switch-client -n
|
|
|
|
bind-key 'l' next-window
|
2024-03-17 12:34:17 +00:00
|
|
|
bind-key 'n' new-window -c '#{pane_current_path}'
|
2024-03-17 12:40:26 +00:00
|
|
|
bind-key 'N' new-window
|
2023-12-10 21:22:07 +00:00
|
|
|
bind-key 'c' kill-window
|
|
|
|
|
|
|
|
# Decide whether we're in a Vim process
|
|
|
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
|
|
|
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
|
|
|
|
|
|
|
unbind y
|
|
|
|
bind-key 'y' if-shell "$is_vim" 'send-keys F5' 'select-pane -L'
|
|
|
|
unbind u
|
|
|
|
bind-key 'u' if-shell "$is_vim" 'send-keys F6' 'select-pane -D'
|
|
|
|
unbind i
|
|
|
|
bind-key 'i' if-shell "$is_vim" 'send-keys F7' 'select-pane -U'
|
|
|
|
unbind o
|
|
|
|
bind-key 'o' if-shell "$is_vim" 'send-keys F8' 'select-pane -R'
|
|
|
|
|
2024-03-17 12:34:17 +00:00
|
|
|
# Tmus sessionizer
|
|
|
|
unbind s
|
2024-03-19 03:00:44 +00:00
|
|
|
bind-key 's' display-popup -E -w 90% -h 90% "~/.local/bin/tms"
|
2024-03-17 12:34:17 +00:00
|
|
|
|
|
|
|
#Lazygit
|
|
|
|
unbind g
|
2024-07-31 14:24:06 +01:00
|
|
|
bind-key 'g' display-popup -d '#{pane_current_path}' -E -w 95% -h 95% "lazygit"
|