_d3f4ult

[+] .tmux.conf [+]

Oct 6th, 2014
1,244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. # Initialization
  2. ###########################
  3.  
  4. # Unbind all keys
  5. #unbind-key -a
  6.  
  7. ###########################
  8. # General
  9. ###########################
  10.  
  11. # Set prefix to M-e
  12. set -g prefix M-e
  13. unbind M-e ; bind M-e send-prefix
  14.  
  15. # Set general options
  16. set -g mode-keys vi # vi keybindings for movement
  17. set -g status-keys vi # vi keybindings for movement
  18. set -g base-index 1 # base window index (default 0)
  19. set -g pane-base-index 1 # base pane index (default 0)
  20. set -g history-limit 100000 # increase history size
  21. set -g default-terminal "screen-256color" # 256 color terminal
  22. set -g renumber-windows on # Renumber windows
  23.  
  24. # Set ability to capture on start and restore on exit window data when running an application
  25. setw -g alternate-screen on
  26.  
  27. # Server options
  28. set -sg escape-time 10
  29.  
  30. # Window title
  31. set -g set-titles on
  32. set -g set-titles-string '[#S] #I:#W'
  33.  
  34. # Set window options
  35. setw -g aggressive-resize on # Resize window to active viewer
  36.  
  37. ###########################
  38. # Status Bar
  39. ###########################
  40.  
  41. set -g status-utf8 on # enable UTF-8 support in status bar
  42. set -g status-interval 30 # set refresh interval for status bar
  43. set -g status-justify left # left justify status bar
  44. set -g status-left-length 40 #
  45.  
  46. # show session, window, pane in left status bar
  47. set -g status-left '#[fg=green]#S#[fg=blue] #I:#P#[default]'
  48.  
  49. # show hostname, date, time, and battery in right status bar
  50. set -g status-right '#[fg=blue]#H#[default] %Y-%m-%d %H:%M '
  51.  
  52. set -g terminal-overrides 'xterm*:smcup@:rmcup@'
  53.  
  54. ###########################
  55. # Colors
  56. ###########################
  57.  
  58. # color status bar
  59. set -g status-bg colour235
  60. set -g status-fg white
  61.  
  62. # set color of active pane
  63. set -g pane-border-fg colour235
  64. set -g pane-border-bg black
  65. set -g pane-active-border-fg green
  66. set -g pane-active-border-bg black
  67.  
  68. # highlight current window
  69. setw -g window-status-current-fg black
  70. setw -g window-status-current-bg green
  71.  
  72. setw -g automatic-rename on
  73.  
  74. ###########################
  75. # Key bindings
  76. ###########################
  77.  
  78. unbind M-l ; bind M-l list-panes
  79. unbind M-r ; bind M-r source-file ~/.tmux.conf
  80. unbind M-c ; bind M-c new-window
  81. unbind M-d ; bind M-d detach-client
  82. unbind M-h ; bind M-h select-layout even-horizontal
  83. unbind M-v ; bind M-v select-layout even-vertical
  84. unbind M-t ; bind M-t select-layout tiled
  85. unbind M-n ; bind M-n select-layout main-vertical
  86. unbind M-m ; bind M-m select-layout main-horizontal
  87. unbind Space ; bind Space copy-mode
  88.  
  89. bind -n M-n next
  90. bind -n M-p prev
  91. bind -n M-z resize-pane -Z
  92. bind -n M-, split-window -v
  93. bind -n M-. split-window -h
  94.  
  95. # Pane switching: vi style
  96. bind -n M-h select-pane -L
  97. bind -n M-j select-pane -D
  98. bind -n M-k select-pane -U
  99. bind -n M-l select-pane -R
  100.  
  101. # Pane switching: arrows
  102. bind -n M-Left select-pane -L
  103. bind -n M-Down select-pane -D
  104. bind -n M-Up select-pane -U
  105. bind -n M-Right select-pane -R
  106.  
  107. # Shift arrow to switch windows
  108. bind -n S-Left previous-window
  109. bind -n S-Right next-window
  110.  
  111. # Make vi mode behave more like vi
  112. bind -t vi-copy 'v' begin-selection
  113. bind -t vi-copy 'y' copy-selection
  114. bind -t vi-copy Home start-of-line
  115. bind -t vi-copy End end-of-line
  116. bind -t vi-copy Escape cancel
  117. bind -t vi-copy q cancel
  118.  
  119. # Enter copy mode and scroll one page up with Alt-PageUp
  120. bind -n M-PPage copy-mode -u
  121.  
  122. ###########################
  123. # Mouse
  124. ###########################
  125.  
  126. set -g mode-mouse off
  127. set -g mouse-resize-pane off
  128. set -g mouse-select-pane off
  129. set -g mouse-select-window off
  130.  
  131. ## Toggle mouse mode on
  132. bind M-r \
  133. set -g mode-mouse on \;\
  134. set -g mouse-resize-pane on \;\
  135. set -g mouse-select-pane on \;\
  136. set -g mouse-select-window on \;\
  137. #
  138. ## Toggle mouse mode off
  139. bind M-w \
  140. set -g mode-mouse off \;\
  141. set -g mouse-resize-pane off \;\
  142. set -g mouse-select-pane off \;\
  143. set -g mouse-select-window off \;\
  144.  
  145. # Enable Shift-PgUp/PgDown for scrolling
  146. #set -g terminal-overrides 'xterm*:smcup@:rmcup@'
Advertisement
Add Comment
Please, Sign In to add comment