# Personal Tmux config file. # Last Changed: 2020-02-15 # Author: Federico Igne # License: This file is placed in the public domain. # Set terminal colors. # Note to self: you changed this so many times it doesn't make any sense # anymore. If you have problems with colors/fonts and terminal # applications (e.g., Vim, (Neo)Mutt) come back here and tweak the # option. set -g default-terminal "tmux-256color" set -gas terminal-overrides ",st*:Tc" # Seamless navigation between TMux panes and special splits # (Vim/Weechat). This works well with a Vim plugin that does the same # from Vim perspective. # See # https://github.com/christoomey/vim-tmux-navigator # for more information. is_special="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|weechat|n?vim?x?)(diff)?$'" bind-key -n C-h if-shell "$is_special" "send-keys C-h" "select-pane -L" bind-key -n C-j if-shell "$is_special" "send-keys C-j" "select-pane -D" bind-key -n C-k if-shell "$is_special" "send-keys C-k" "select-pane -U" bind-key -n C-l if-shell "$is_special" "send-keys C-l" "select-pane -R" bind-key -T copy-mode-vi C-h select-pane -L bind-key -T copy-mode-vi C-j select-pane -D bind-key -T copy-mode-vi C-k select-pane -U bind-key -T copy-mode-vi C-l select-pane -R # In the Weechat case, we don't have a way to seemlessly jump in the # Weechat->Tmux direction, so we need to escape the binding with # . #bind-key C-h select-pane -L #bind-key C-j select-pane -D #bind-key C-k select-pane -U #bind-key C-l select-pane -R