Add tmux config
This commit is contained in:
parent
ea8d63ee31
commit
193447d5d7
|
@ -0,0 +1,59 @@
|
|||
# Renumber windows of one is closed: 0,1,2 -> 0,1 instead of 0,2
|
||||
set-option -g renumber-windows on
|
||||
# Use vi keybindings in copy mode
|
||||
set-window-option -g mode-keys vi
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
||||
|
||||
# Use C-a as prefix
|
||||
unbind C-b
|
||||
set-option -g prefix C-a
|
||||
bind-key C-a send-prefix
|
||||
|
||||
# More visual split commands
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# Allow to use the mouse
|
||||
set -g mouse on
|
||||
|
||||
# theme
|
||||
set -g @themepack 'powerline/double/blue'
|
||||
|
||||
# Allow using ctrl + arrow keys
|
||||
set-option -g xterm-keys on
|
||||
|
||||
# status bar
|
||||
# set -g status-right '#{net_speed} | #{prefix_highlight} #{battery_icon}#{battery_percentage} | %a %h-%d %H:%M'
|
||||
set-window-option -g status-left " #S "
|
||||
set-window-option -g status-right " #{prefix_highlight} \"#(hostname)\" %H:%M %d-%b-%y "
|
||||
set-window-option -g window-status-format " #I: #W "
|
||||
set-window-option -g window-status-current-format " #I: #W "
|
||||
|
||||
# Vim integration
|
||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
|
||||
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
||||
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
||||
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
||||
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
||||
set -g default-terminal "screen-256color"
|
||||
# bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l""
|
||||
|
||||
# Plugins (Keep this last)
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
# set -g @plugin 'tmux-plugins/tmux-battery'
|
||||
set -g @plugin 'tmux-plugins/tmux-copycat'
|
||||
set -g @plugin 'tmux-plugins/tmux-open'
|
||||
# set -g @plugin 'tmux-plugins/tmux-online-status'
|
||||
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
# set -g @plugin 'seebi/tmux-colors-solarized'
|
||||
set -g @plugin 'jimeh/tmux-themepack'
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
#ZSH
|
||||
set -g default-shell /bin/zsh
|
Loading…
Reference in New Issue