Guest User

Untitled

a guest
Aug 14th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.13 KB | None | 0 0
  1. # use UTF8
  2. #set -g utf8
  3. #set-window-option -g utf8 on
  4.  
  5. # make tmux display things in 256 colors
  6. set -g default-terminal "screen-256color"
  7.  
  8. # set scrollback history to 10000 (10k)
  9. set -g history-limit 100000
  10.  
  11. # set Ctrl-a as the default prefix key combination
  12. # and unbind C-b to free it up
  13. #set -g prefix C-j
  14. #unbind C-b
  15. #unbind C-a
  16.  
  17. # use send-prefix to pass C-a through to application
  18. #bind C-j send-prefix
  19.  
  20. # shorten command delay
  21. set -sg escape-time 1
  22.  
  23. # set window and pane index to 1 (0 by default)
  24. set-option -g base-index 1
  25. setw -g pane-base-index 1
  26.  
  27. # reload ~/.tmux.conf using PREFIX r
  28. bind r source-file ~/.tmux.conf \; display "Reloaded!"
  29.  
  30. # use PREFIX | to split window horizontally and PREFIX - to split vertically
  31. bind | split-window -h
  32. bind \ split-window -h
  33. bind - split-window -v
  34.  
  35. # Make the current window the first window
  36. bind T swap-window -t 1
  37.  
  38. # map Vi movement keys as pane movement keys
  39. # bind h select-pane -L
  40. # bind j select-pane -D
  41. # bind k select-pane -U
  42. # bind l select-pane -R
  43. bind w select-pane -l #select last pane
  44. bind-key -n M-W last-pane
  45.  
  46. # and use C-h and C-l to cycle thru panes
  47. bind -r C-h select-window -t :-
  48. bind -r C-l select-window -t :+
  49.  
  50. # resize panes using PREFIX H, J, K, L
  51. bind -r H resize-pane -L 5
  52. bind -r J resize-pane -D 5
  53. bind -r K resize-pane -U 5
  54. bind -r L resize-pane -R 5
  55.  
  56. # explicitly disable mouse control
  57. #set -g mode-mouse on
  58. #set -g mouse-resize-pane on
  59. #set -g mouse-select-pane on
  60. #set -g mouse-select-window on
  61. set-option -g mouse on
  62. #set-option -g mouse-utf8 on
  63. # ---------------------
  64. # Copy & Paste
  65. # ---------------------
  66. # provide access to the clipboard for pbpaste, pbcopy
  67. # set-option -g default-command "reattach-to-user-namespace -l zsh"
  68. # set-option -g default-command "bash"
  69. set-option -g default-command "zsh"
  70. set-window-option -g automatic-rename on
  71.  
  72. # use vim keybindings in copy mode
  73. setw -g mode-keys vi
  74.  
  75. # setup 'v' to begin selection as in Vim
  76. #bind-key -t vi-copy v begin-selection
  77. #bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
  78. #bind-key -t vi-copy y copy-pipe "xclip -selection clipboard -i"
  79.  
  80. # update default binding of 'Enter' to also use copy-pipe
  81. #unbind -t vi-copy Enter
  82. # bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
  83. #bind-key -t vi-copy Enter copy-pipe "xclip -selection clipboard -i"
  84.  
  85. # bind y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
  86. # bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
  87. bind y run "tmux show-buffer | xclip -i -selection clipboard"
  88. bind C-y run "tmux show-buffer | xclip -i -selection clipboard"
  89.  
  90. # ----------------------
  91. # set some pretty colors
  92. # ----------------------
  93. # set pane colors - hilight the active pane
  94. # set-option -g pane-border-fg colour235 #base02
  95. # set-option -g pane-active-border-fg colour240 #base01
  96.  
  97. # colorize messages in the command line
  98. # set-option -g message-bg black #base02
  99. # set-option -g message-fg brightred #orange
  100.  
  101. # ----------------------
  102. # Status Bar
  103. # -----------------------
  104. set-option -g status on # turn the status bar on
  105. #set -g status-utf8 on # set utf-8 for the status bar
  106. set -g status-interval 5 # set update frequencey (default 15 seconds)
  107. set -g status-justify centre # center window list for clarity
  108. set-option -g status-position top # position the status bar at top of screen
  109.  
  110. # visual notification of activity in other windows
  111. setw -g monitor-activity on
  112. set -g visual-activity on
  113.  
  114. # set color for status bar
  115. #set-option -g status-bg colour235 #base02
  116. # set-option -g status-bg default
  117. # set-option -g status-fg yellow #yellow
  118. # set-option -g status-fg white
  119. # set-option -g status-attr dim
  120.  
  121. # set window list colors - red for active and cyan for inactive
  122. #set-window-option -g window-status-fg white
  123. #set-window-option -g window-status-bg colour236
  124. #set-window-option -g window-status-attr bright
  125.  
  126. #set-window-option -g window-status-current-fg black
  127. #set-window-option -g window-status-current-bg yellow
  128. #set-window-option -g window-status-current-attr bright
  129.  
  130. # show host name and IP address on right side of status bar
  131. set -g status-right-length 70
  132. set -g status-right "#[fg=green]#h@#[fg=yellow]#(ifconfig eth0 | grep 'inet ' | awk '{print $2}')"
  133.  
  134. # show session name, window & pane number, date and time on right side of
  135. # status bar
  136. set -g status-left-length 60
  137. set -g status-left "#[fg=green]::%l:%M %p#[fg=yellow]::%Y-%m-%d::#[fg=blue]#S #[fg=colour255]Tab#[fg=yellow]#I#[fg=colour255]:Pane#[fg=yellow]#P"
  138.  
  139. #### COLOUR (Solarized 256)
  140.  
  141. # default statusbar colors
  142. set-option -g status-bg colour235 #base02
  143. set-option -g status-fg colour136 #yellow
  144. set-option -g status-attr bright
  145.  
  146. # default window title colors
  147. set-window-option -g window-status-fg colour244 #base0
  148. set-window-option -g window-status-bg default
  149. set-window-option -g window-status-attr dim
  150.  
  151. # active window title colors
  152. set-window-option -g window-status-current-fg yellow
  153. set-window-option -g window-status-current-bg default
  154. set-window-option -g window-status-current-attr bright
  155.  
  156. # set-window-option -g window-status-current-format "#[fg=colour235, bg=colour166]#[fg=colour255, bg=colour166]#I:#W #[fg=colour166, bg=colour235]"
  157. # set-window-option -g window-status-format "#[fg=colour235, bg=colour244]#[fg=colour255, bg=colour244]#I:#W#F#[fg=colour244, bg=colour235]"
  158. # pane border
  159. set-option -g pane-border-fg colour235 #base02
  160. set-option -g pane-active-border-fg colour240 #base01
  161.  
  162. # message text
  163. set-option -g message-bg colour235 #base02
  164. set-option -g message-fg colour166 #orange
  165.  
  166. # pane number display
  167. set-option -g display-panes-active-colour colour33 #blue
  168. set-option -g display-panes-colour colour166 #orange
  169.  
  170. # clock
  171. set-window-option -g clock-mode-colour colour64 #green
  172. # Smart pane switching with awareness of vim splits
  173. # bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
  174. # bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
  175. # bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
  176. # bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
  177. # bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
  178.  
  179. # key binding for ALT+num
  180. # switch windows alt+number
  181. bind-key -n M-1 select-window -t 1
  182. bind-key -n M-2 select-window -t 2
  183. bind-key -n M-3 select-window -t 3
  184. bind-key -n M-4 select-window -t 4
  185. bind-key -n M-5 select-window -t 5
  186. bind-key -n M-6 select-window -t 6
  187. bind-key -n M-7 select-window -t 7
  188. bind-key -n M-8 select-window -t 8
  189. bind-key -n M-9 select-window -t 9
  190. bind-key -n M-q display-panes
  191.  
  192. bind C-k rotate-window
  193. bind k rotate-window
  194. bind C-j last-pane
  195. bind j last-pane
  196.  
  197.  
  198. # List of plugins
  199. set -g @plugin 'tmux-plugins/tpm'
  200. set -g @plugin 'tmux-plugins/tmux-sensible'
  201. set -g @plugin 'tmux-plugins/tmux-yank'
  202.  
  203. # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
  204. run '~/.tmux/plugins/tpm/tpm'
Add Comment
Please, Sign In to add comment