Created
November 18, 2017 08:27
-
-
Save moltak/6c4fd1693c28bce1fc545429a0de9470 to your computer and use it in GitHub Desktop.
my tmux config file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setw -g mode-keys vi | |
set -g mouse on | |
bind m set -g mouse on | |
bind M set -g mouse off | |
# 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)?$'" | |
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" | |
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" | |
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" | |
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" | |
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @plugin 'moltak/tmux-open' | |
set -g @plugin 'tmux-plugins/tmux-battery' | |
set -g @plugin 'jimeh/tmux-themepack' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'jbnicolai/tmux-fpp' | |
# theme | |
set -g @themepack 'basic' | |
set -g status-right '#{battery_status_bg} Batt: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M' | |
# for vim session restore | |
set -g @resurrect-strategy-vim 'session' | |
# tmux-yank | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# tmux-open | |
set -g @open 'O' | |
# tmux fpp | |
set -g @fpp-key 'x' | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment