Skip to content

Instantly share code, notes, and snippets.

@bbtdev
Created April 3, 2018 16:47
Show Gist options
  • Save bbtdev/82783aa677bcb98320cff5d9ad3b201a to your computer and use it in GitHub Desktop.
Save bbtdev/82783aa677bcb98320cff5d9ad3b201a to your computer and use it in GitHub Desktop.
tmux config denisa lubuntu
# ORIGINAL
# bind-key v split-window -h
# bind-key s split-window -v
# bind-key h select-pane -L
# bind-key j select-pane -D
# bind-key k select-pane -U
# bind-key l select-pane -R
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"
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
bind-key -T copy-mode-vi C-\ select-pane -l
# Testing
unbind C-a
set -g prefix C-a
# if I need C-a bind-key z send-prefix
bind R source-file ~/.tmux.conf \; display "~/.tmux.conf reloaded"
#set -g @plugin 'mkoga/tmux-solarized'
set -g @colors-solarized 'light'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'seebi/tmux-colors-solarized'
# 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'
# 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