Guest User

Untitled

a guest
Nov 18th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. # quick pane cycling
  2. unbind ^A
  3. bind ^A select-pane -t :.+
  4. bind Tab last-window
  5. bind Escape copy-mode
  6.  
  7. bind-key a send-prefix
  8.  
  9. unbind S
  10. bind S command-prompt "switch -t %1"
  11.  
  12.  
  13. #remap prefix from 'C-b' to 'C-a'
  14. unbind C-b
  15. set-option -g prefix C-a
  16. bind-key C-a send-prefix
  17.  
  18. # split panes using | and -
  19.  
  20. bind | split-window -h
  21. bind - split-window -v
  22. unbind '"'
  23. unbind %
  24.  
  25. # force a reload of the config file
  26. unbind r
  27. bind r source-file ~/.tmux.conf
  28.  
  29. is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
  30. | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
  31.  
  32. bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
  33. bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
  34. bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
  35. bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
  36. bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
  37.  
  38. # Enable mouse mode (tmux 2.1 and above)
  39. set -g mouse on
  40.  
  41. # Don't rename windows automatically
  42. set-option -g allow-rename off
  43.  
  44. # start window numbering at 1 for easier switching
  45. set -g base-index 1
  46. setw -g pane-base-index 1
  47.  
  48.  
  49. # vim bindings
  50. set-window-option -g mode-keys vi
  51. bind h select-pane -L
  52. bind j select-pane -D
  53. bind k select-pane -U
  54. bind l select-pane -R
  55.  
  56. # vim style buffer copy
  57. bind [ copy-mode
  58. bind-key -T copy-mode-vi v send-keys -X begin-selection
  59. bind-key -T copy-mode-vi y send-keys -X copy-selection
  60. bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
  61. bind P paste-buffer
  62.  
  63. ######################
  64. ### DESIGN CHANGES ###
  65. ######################
  66.  
  67. # panes
  68. set -g pane-border-fg black
  69. set -g pane-active-border-fg brightred
  70.  
  71. ## Status bar design
  72. # status line
  73. set -g status-justify left
  74. set -g status-bg default
  75. set -g status-fg colour12
  76. set -g status-interval 2
  77.  
  78. # messaging
  79. set -g message-fg black
  80. set -g message-bg yellow
  81. set -g message-command-fg blue
  82. set -g message-command-bg black
  83.  
  84. #window mode
  85. setw -g mode-bg colour6
  86. setw -g mode-fg colour0
  87.  
  88. # window status
  89. setw -g window-status-format " #F#I:#W#F "
  90. setw -g window-status-current-format " #F#I:#W#F "
  91. setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
  92. setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
  93. setw -g window-status-current-bg colour0
  94. setw -g window-status-current-fg colour11
  95. setw -g window-status-current-attr dim
  96. setw -g window-status-bg green
  97. setw -g window-status-fg black
  98. setw -g window-status-attr reverse
  99.  
  100. # Info on left (I don't have a session display for now)
  101. set -g status-left ''
  102.  
  103. # loud or quiet?
  104. set-option -g visual-activity off
  105. set-option -g visual-bell off
  106. set-option -g visual-silence off
  107. set-window-option -g monitor-activity off
  108. set-option -g bell-action none
  109.  
  110. set -g default-terminal "screen-256color"
  111.  
  112. # The modes {
  113. setw -g clock-mode-colour colour135
  114. setw -g mode-attr bold
  115. setw -g mode-fg colour196
  116. setw -g mode-bg colour238
  117.  
  118. # }
  119. # The panes {
  120.  
  121. set -g pane-border-bg colour235
  122. set -g pane-border-fg colour238
  123. set -g pane-active-border-bg colour236
  124. set -g pane-active-border-fg colour51
  125.  
  126. # }
  127. # The statusbar {
  128.  
  129. set -g status-position bottom
  130. set -g status-bg colour234
  131. set -g status-fg colour137
  132. set -g status-attr dim
  133. set -g status-left ''
  134. set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
  135. set -g status-right-length 50
  136. set -g status-left-length 20
  137.  
  138. setw -g window-status-current-fg colour81
  139. setw -g window-status-current-bg colour238
  140. setw -g window-status-current-attr bold
  141. setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
  142.  
  143. setw -g window-status-fg colour138
  144. setw -g window-status-bg colour235
  145. setw -g window-status-attr none
  146. setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
  147.  
  148. setw -g window-status-bell-attr bold
  149. setw -g window-status-bell-fg colour255
  150. setw -g window-status-bell-bg colour1
  151.  
  152. # }
  153. # The messages {
  154.  
  155. set -g message-attr bold
  156. set -g message-fg colour232
  157. set -g message-bg colour166
  158.  
  159. # }
Add Comment
Please, Sign In to add comment