dotfiles/tmux/tmux.conf

45 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2018-04-15 17:01:21 +00:00
set-window-option -g mode-keys vi
2022-02-21 14:20:01 +00:00
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ',xterm-256color:RGB'
2020-09-14 08:09:32 +00:00
set -sg escape-time 10
2019-05-28 15:15:39 +00:00
# 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|n?vim?x?)(diff)?$'"
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'"
bind-key -n C-h run "($is_vim && tmux send-keys C-h) || tmux select-pane -L"
bind-key -n C-j run "($is_vim && tmux send-keys C-j) || ($is_fzf && tmux send-keys C-j) || tmux select-pane -D"
bind-key -n C-k run "($is_vim && tmux send-keys C-k) || ($is_fzf && tmux send-keys C-k) || tmux select-pane -U"
bind-key -n C-l run "($is_vim && tmux send-keys C-l) || tmux select-pane -R"
2021-01-13 07:54:31 +00:00
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
2019-05-28 15:15:39 +00:00
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
2021-01-13 07:54:31 +00:00
bind-key -T copy-mode-vi C-\ select-pane -l
2018-04-15 17:01:21 +00:00
2018-11-16 22:28:07 +00:00
# List of plugins
# Install TPM with
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'seebi/tmux-colors-solarized'
2018-11-20 06:44:22 +00:00
set -g @plugin 'tmux-plugins/tmux-battery'
2018-11-16 22:28:07 +00:00
2020-09-01 12:17:54 +00:00
set -g @colors-solarized 'dark'
2018-11-16 22:28:07 +00:00
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
2022-02-21 14:20:21 +00:00
# set -g status-right '#{battery_status_fg} #{battery_icon} #{battery_percentage} | %H:%M '
set -g status off
2018-11-20 06:44:22 +00:00
2018-11-16 22:28:07 +00:00
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'