blob: 82e06442d11bba2f648d9e3924c0758d025667e5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# Personal Tmux config file.
# Last Changed: 2020-02-15
# Author: Federico Igne <git@federicoigne.com>
# 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
# <prefix>.
#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
|