removes custom keybinds for tmux-nav (conflicts) and adds h to max. pane

This commit is contained in:
2024-04-02 10:32:27 -07:00
parent 71816bb26f
commit 67646141d6

View File

@@ -9,6 +9,8 @@ bind-key n select-pane -D
bind-key e select-pane -U
bind-key i select-pane -R
bind-key h resize-pane -Z
set-option -g status-position top
set -g default-terminal "tmux-256color"
set-option -sg escape-time 10
@@ -21,8 +23,9 @@ set-option -g focus-events on
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
#### Catppuccin theme
# Catppuccin theme
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tpm'
set -g @catppuccin_window_left_separator "█"
@@ -41,27 +44,26 @@ set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
#### TMUX-Navigator
# set -g @plugin 'christoomey/vim-tmux-navigator'
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
bind-key -n 'C-m' if-shell "$is_vim" 'send-keys C-m' 'select-pane -L'
bind-key -n 'C-n' if-shell "$is_vim" 'send-keys C-n' 'select-pane -D'
bind-key -n 'C-e' if-shell "$is_vim" 'send-keys C-e' 'select-pane -U'
bind-key -n 'C-i' if-shell "$is_vim" 'send-keys C-i' 'select-pane -R'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
# is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
# bind-key -n 'C-m' if-shell "$is_vim" 'send-keys C-m' 'select-pane -L'
# bind-key -n 'C-n' if-shell "$is_vim" 'send-keys C-n' 'select-pane -D'
# bind-key -n 'C-e' if-shell "$is_vim" 'send-keys C-e' 'select-pane -U'
# bind-key -n 'C-i' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
bind-key -T copy-mode-vi 'C-m' select-pane -L
bind-key -T copy-mode-vi 'C-n' select-pane -D
bind-key -T copy-mode-vi 'C-e' select-pane -U
bind-key -T copy-mode-vi 'C-i' select-pane -R
bind-key -T copy-mode-vi 'C-k' select-pane -l
# tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
# if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
# "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
# if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
# "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
# bind-key -T copy-mode-vi 'C-m' select-pane -L
# bind-key -T copy-mode-vi 'C-n' select-pane -D
# bind-key -T copy-mode-vi 'C-e' select-pane -U
# bind-key -T copy-mode-vi 'C-i' select-pane -R
# bind-key -T copy-mode-vi 'C-k' select-pane -l
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)