Advertisement
Guest User

Tmux Config File

a guest
Sep 25th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.86 KB | None | 0 0
  1. ###-------------###
  2. ### tmux.conf ###
  3. ###-------------###
  4.  
  5. ## Reload tmux.conf configuration file
  6. ## Note: alternative way to reload the configuration file:
  7. ## Method 1: Run from command line: tmux source-file ~/.tmux.conf
  8. ## Method 2: In any tmux sessions: [prefix Ctrl-b] : source-file /usr/local/etc/tmux.conf
  9. ## Method 3: bind the source-file command with a key like following line, then you type: ctrl-b-r
  10. bind R source-file ~/.tmux.conf
  11.  
  12. ###################################################################################
  13. ### Keybindngs ###
  14.  
  15. ## Note: key meaning
  16. ## C- means ctrl-, so C-x is ctrl-x.
  17. ## M- means meta (generally left-alt or escape)-, so M-x is left-alt-x.
  18.  
  19. ## Set the prefix to ^A.
  20. ## Note: the default prefix is Ctrl-b.
  21. unbind C-b
  22. set -g prefix ^A
  23. bind a send-prefix
  24.  
  25. ## unbind existing tmux key-bindings
  26. unbind '"'
  27. unbind '#'
  28. unbind &
  29. unbind ,
  30. unbind -
  31. unbind :
  32. unbind =
  33. unbind ?
  34. unbind [
  35. unbind o
  36. unbind p
  37. unbind r
  38. unbind s
  39. unbind t
  40. unbind w
  41. unbind x
  42.  
  43. unbind Up
  44. unbind Down
  45. unbind M-Up
  46. unbind M-Down
  47. unbind C-Up
  48. unbind C-Down
  49.  
  50. ## lock the session
  51. bind ^X lock-server
  52. bind x lock-server
  53.  
  54. ## command prompt to send specific tmux commands
  55. bind : command-prompt
  56.  
  57. ## spawn a new window
  58. bind ^C new-window
  59. bind c new-window
  60.  
  61. ## copy ^[ [
  62. bind ^[ copy-mode
  63. bind [ copy-mode
  64.  
  65. ## paste ] ^]
  66. bind ] paste-buffer
  67. bind ^] paste-buffer
  68.  
  69. ## " windowlist -b
  70. bind '"' choose-window
  71.  
  72. ## detach
  73. bind ^D detach
  74.  
  75. ## meta key
  76. bind a send-prefix
  77.  
  78. ## last window
  79. bind ^A last-window
  80.  
  81. ## next term
  82. bind ^N next-window
  83. bind n next-window
  84.  
  85. ## previous term
  86. bind ^P previous-window
  87. bind p previous-window
  88.  
  89. ## print help
  90. bind ? list-keys
  91.  
  92. ## print a list of windows
  93. bind ^W list-windows
  94. bind w list-windows
  95.  
  96. ## rename the current window
  97. bind A command-prompt "rename-window %%"
  98.  
  99. ## kill the current window
  100. bind K kill-window
  101. bind k kill-window
  102.  
  103. ## refresh the current window
  104. bind ^L refresh-client
  105. bind l refresh-client
  106.  
  107. ## quit the current session
  108. bind \ kill-server
  109.  
  110. ## Mouse On/Off ## {
  111. ## Mouse On by default
  112. set -g mode-mouse on
  113. set -g mouse-resize-pane on
  114. set -g mouse-select-pane on
  115. set -g mouse-select-window on
  116.  
  117. ##Toggle mouse on with <prefix>m
  118. bind m \
  119. set -g mode-mouse on \;\
  120. set -g mouse-resize-pane on \;\
  121. set -g mouse-select-pane on \;\
  122. set -g mouse-select-window on \;\
  123. display 'Mouse: ON'
  124.  
  125. ## Toggle mouse off with <prefix>M
  126. bind M \
  127. set -g mode-mouse off \;\
  128. set -g mouse-resize-pane off \;\
  129. set -g mouse-select-pane off \;\
  130. set -g mouse-select-window off \;\
  131. display 'Mouse: OFF'
  132. ## End Mouse On/Off ## }
  133.  
  134. # move x clipboard into tmux paste buffer
  135. bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
  136.  
  137. ## move tmux copy buffer into x clipboard
  138. bind C-y run "tmux show-buffer | xclip -i"
  139.  
  140. ###---------------------------
  141.  
  142. ## Split windows like vim
  143. ## vim's definition of a horizontal/vertical split is reversed from tmux's
  144. bind s split-window -v
  145. bind v split-window -h
  146.  
  147. ## Move around panes with hjkl, as one would in vim after pressing ctrl-w
  148. bind h select-pane -L
  149. bind j select-pane -D
  150. bind k select-pane -U
  151. bind l select-pane -R
  152.  
  153. ## Resize panes like vim
  154. bind < resize-pane -L 5
  155. bind > resize-pane -R 5
  156. bind - resize-pane -D 5
  157. bind + resize-pane -U 5
  158.  
  159. ## bind : to command-prompt like vim
  160. ## this is the default in tmux already
  161. bind : command-prompt
  162.  
  163. ## vi-style controls for copy mode
  164. setw -g mode-keys vi
  165.  
  166. ###################################################################################
  167. ### $TERM Options ###
  168.  
  169. ## 256 color Terminal
  170. set -g default-terminal screen-256color
  171.  
  172. ## Instructs tmux to expect UTF-8 sequences to appear in this window.
  173. setw -g utf8 on
  174.  
  175. ## Instruct tmux to treat top-bit-set characters in the status-left and status-right strings as UTF-8;
  176. set -g status-utf8 on
  177.  
  178. ## Fix for setting URxvt Window Title
  179. set -ga terminal-overrides ",screen*,rxvt*:XT"
  180.  
  181. ## Enable italic font support for rxvt-unicode
  182. #set -g terminal-overrides "rxvt-unicode-256color:sitm@"
  183.  
  184. ## Enable mouse scrolling support in tmux
  185. set-window-option -g mode-mouse on
  186.  
  187. ## Enable system audible bell
  188. set-option -g bell-action any
  189.  
  190. ###################################################################################
  191. ### Misc Options ###
  192.  
  193. ## Set the maximum number of lines held in window history.
  194. set -g history-limit 5000
  195.  
  196. ## Set Window Titles
  197. setw -g set-titles on
  198. setw -g set-titles-string "#S:#I.#P :#W - #T"
  199. setw -g automatic-rename on
  200. ###################################################################################
  201. ### Status Bar Options ###
  202.  
  203. ## Enable Status Bar
  204. set-option -g status on
  205.  
  206. ## refresh status bar in seconds
  207. #set-option -g status-interval 15
  208.  
  209. ## Set window notifications
  210. setw -g monitor-activity on
  211. #set -g visual-activity on
  212.  
  213. ###-----------------------------
  214.  
  215. # settings copied from output of tmuxline_setup
  216. set -g status-bg "colour0"
  217. set -g message-command-fg "colour7"
  218. set -g status-justify "centre"
  219. set -g status-left-length "100"
  220. set -g status "on"
  221. set -g pane-active-border-fg "colour5"
  222. set -g message-bg "colour11"
  223. set -g status-right-length "100"
  224. set -g status-right-attr "none"
  225. set -g message-fg "colour7"
  226. set -g message-command-bg "colour11"
  227. set -g status-attr "none"
  228. set -g pane-border-fg "colour11"
  229. set -g status-left-attr "none"
  230. setw -g window-status-fg "colour10"
  231. setw -g window-status-attr "none"
  232. setw -g window-status-activity-attr "underscore"
  233. setw -g window-status-separator ""
  234. setw -g window-status-bg "colour0"
  235. set -g status-left "#[fg=colour15,bg=colour14,bold] #S #[fg=colour14,bg=colour11,nobold,nounderscore,noitalics]/#[fg=colour7,bg=colour11] #F #[fg=colour11,bg=colour0,nobold,nounderscore,noitalics]#[fg=colour10,bg=colour0] #W #[fg=colour0,bg=colour0,nobold,nounderscore,noitalics]"
  236. set -g status-right "#[fg=colour5,bg=colour0] \\m/ #[fg=colour10,bg=colour0]#(mpc current | cut -c 1-30) #[fg=colour3,bg=colour0]#(sysctl -n dev.cpu.0.temperature)#[fg=colour0,bg=colour0,nobold,nounderscore,noitalics]#[fg=colour10,bg=colour0]%a #[fg=colour11,bg=colour0,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour11] %b %d  %R #[fg=colour14,bg=colour11,nobold,nounderscore,noitalics]#[fg=colour15,bg=colour14] #H "
  237. setw -g window-status-format "#[fg=colour0,bg=colour0,nobold,nounderscore,noitalics]#[default] #I  #W #[fg=colour0,bg=colour0,nobold,nounderscore,noitalics]"
  238. setw -g window-status-current-format "#[fg=colour0,bg=colour11,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour11] #I  #W #[fg=colour11,bg=colour0,nobold,nounderscore,noitalics]"
  239.  
  240. ###-----------------------------
  241.  
  242. ## pane number display
  243. set-option -g display-panes-active-colour '#268bd2' #orange
  244. set-option -g display-panes-colour '#586e75' #blue
  245.  
  246. ###################################################################################
  247. ### Launch Commands Configuration ###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement