dotfiles/.config/tmux/tmux_binds.conf

33 lines
938 B
Text
Raw Normal View History

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
bind-key 'n' new-window -c '#{pane_current_path}'
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'
# Tmus sessionizer
unbind s
bind-key 's' display-popup -E -w 90% -h 90% "~/.local/bin/tms"
2024-11-28 18:33:37 +00:00
#Lazygit (now taken care of by plugins)
# unbind g
# bind-key 'g' display-popup -d '#{pane_current_path}' -E -w 95% -h 95% "lazygit"