dotfiles

Config files from my daily system
Index Commits Files Refs README
.config/tmux/tmux.conf (3018B)
   1 #          _
   2 #         | |_ _ __ ___  _   ___  __
   3 #         | __| '_ ` _ \| | | \ \/ /
   4 #         | |_| | | | | | |_| |>  <
   5 #          \__|_| |_| |_|\__,_/_/\_\
   6 #
   7 #        by github.com/klewer-martin
   8 
   9 # Use prefix + vi navigation keys to navigate panes
  10 bind h select-pane -L
  11 bind j select-pane -D
  12 bind k select-pane -U
  13 bind l select-pane -R
  14 
  15 # Start counting windows from 1, to avoid pressing 0 to go to the first one
  16 set -g base-index 1
  17 
  18 # Avoid esc delay
  19 set -g escape-time 10
  20 
  21 # Enable mouse support
  22 set -g mouse on
  23 
  24 set-option -g focus-events on
  25 
  26 # More friendly split pane
  27 bind-key / split-window -v
  28 bind-key "'" split-window -h
  29 
  30 bind-key \" split-window -h -c "#{pane_current_path}"
  31 bind-key '?' split-window -c "#{pane_current_path}"
  32 
  33 bind-key \; last-window
  34 
  35 set-option -g history-limit 50000
  36 
  37 #source /usr/share/powerline/bindings/tmux/powerline.conf
  38 
  39 # Status bar theme
  40 set -g status-bg 'colour233'
  41 
  42 set -g status-justify 'left'
  43 set -g status-left-length '65'
  44 set -g status 'on'
  45 set -g status-right-length '100'
  46 setw -g window-status-separator ''
  47 
  48 set -g message-command-style fg=black,bg=green
  49 set -g message-style fg=black,bg=cyan
  50 set -g pane-active-border-style fg=colour236
  51 set -g pane-border-style fg=colour236
  52 setw -g window-status-style fg=yellow,none
  53 setw -g window-status-activity-style fg=green,bg=black,none
  54 setw -g window-status-style bg=black
  55 
  56 
  57 # Status bar style
  58 set -g status-left "#[fg=colour240,bold,bg=colour233] #S  #(echo  '#{pane_current_path}' | shortpath)  #(tmux_status.sh '#{pane_current_path}')"
  59 set -g status-right ''
  60 set -g set-titles on
  61 
  62 setw -g window-status-format '#[fg=colour239,bg=colour233,nobold,nounderscore,noitalics] #I #W #F '
  63 setw -g window-status-current-format '#[fg=colour207,bg=colour233,nobold,nounderscore,noitalics] #I #W #F '
  64 
  65 # Smart pane switching with awareness of Vim splits.
  66 # See: https://github.com/christoomey/vim-tmux-navigator
  67 is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
  68     | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
  69 bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h'  'select-pane -L'
  70 bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j'  'select-pane -D'
  71 bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k'  'select-pane -U'
  72 bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l'  'select-pane -R'
  73 tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
  74 if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
  75     "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\'  'select-pane -l'"
  76 if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
  77     "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\'  'select-pane -l'"
  78 
  79 bind-key -T copy-mode-vi 'C-h' select-pane -L
  80 bind-key -T copy-mode-vi 'C-j' select-pane -D
  81 bind-key -T copy-mode-vi 'C-k' select-pane -U
  82 bind-key -T copy-mode-vi 'C-l' select-pane -R
  83 # bind-key -T copy-mode-vi 'C-\' select-pane -l
  84 
  85 set-option -g status-interval 1
  86 set-option -g automatic-rename on
  87 
  88 # change \E[?12l to \E[?12h
  89 # set-option -ga terminal-overrides ',xterm-kitty:cnorm=\E[?12h\E[?25h'