tmux.conf 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. ##############################
  2. # _
  3. # | |_ _ __ ___ _ ___ __
  4. # | __| '_ ` _ \| | | \ \/ /
  5. # | |_| | | | | | |_| |> <
  6. # \___|_| |_| |_|\__,_/_/\_\
  7. #
  8. #############################
  9. #
  10. # COPY AND PASTE
  11. # http://robots.thoughtbot.com/tmux-copy-paste-on-os-x-a-better-future
  12. #
  13. # Use emacs keybindings in copy mode
  14. setw -g mode-keys emacs
  15. ############################################################################
  16. # Global options
  17. ############################################################################
  18. # large history
  19. set-option -g history-limit 10000
  20. # colors
  21. setw -g mode-bg black
  22. setw -g mode-fg white
  23. set-option -g pane-active-border-fg black
  24. # utf8 support
  25. # set-window-option -g utf8 on
  26. # basic settings
  27. set-window-option -g xterm-keys on # for emacs
  28. # Do not automatically set window title
  29. setw -g automatic-rename off
  30. # use mouse or not
  31. # setw -g mode-mouse off
  32. # setw -g mouse-resize-pane off
  33. # set -g mouse-select-window off
  34. # set -g mouse-select-pane off
  35. # vi movement keys
  36. # set-option -g status-keys vi
  37. ############################################################################
  38. # Status Bar
  39. ############################################################################
  40. # set-option -g status-utf8 on
  41. set-option -g status-justify left
  42. set-option -g status-interval 60
  43. set-option -g status-left-length 50
  44. set-option -g status-left ' #[fg=colour214]#S⋮ #(uptime | sed "s/.*: //g")⋮ '
  45. set-option -g status-right '#[fg=colour99]#(~/.bin/olf) ~ #[fg=colour214]%a %d %b ~ %H:%M #[default] '
  46. set-option -g status-right-length 160
  47. set-option -g status-position top
  48. ### light theme
  49. # set-option -g status-bg colour248
  50. # set-option -g status-fg colour54
  51. # setw -g window-status-current-bg colour250
  52. # setw -g window-status-current-fg colour54
  53. # setw -g window-status-bg colour247
  54. # setw -g window-status-fg colour233
  55. ### dark theme
  56. set-option -g status-bg colour233
  57. set-option -g status-fg colour243
  58. setw -g window-status-bg colour234
  59. setw -g window-status-fg colour248
  60. setw -g window-status-current-bg colour234
  61. setw -g window-status-current-fg colour208
  62. # Last activated window
  63. setw -g window-status-last-style none
  64. setw -g window-status-last-fg colour130
  65. # activity window
  66. set-option -g visual-activity on
  67. set-window-option -g monitor-activity on
  68. setw -g monitor-activity on
  69. setw -g window-status-activity-bg colour33
  70. setw -g window-status-activity-fg colour234
  71. # Titles (window number, program name, active (or not)
  72. set-option -g set-titles on
  73. set-option -g set-titles-string '»#H/#S #I:#W«'
  74. # window status
  75. setw -g window-status-format "⋮#I:#W"
  76. setw -g window-status-attr none
  77. setw -g window-status-current-format "⋮#I:#W"
  78. setw -g window-status-current-attr none
  79. # Clear
  80. # set-window-option -g alternate-screen on
  81. ############################################################################
  82. # Unbindings
  83. ############################################################################
  84. #unbind [ # copy mode bound to escape key
  85. unbind j
  86. unbind C-b # unbind default leader key
  87. unbind '"' # unbind horizontal split
  88. unbind % # unbind vertical split
  89. unbind -n S-Left
  90. unbind -n S-Home
  91. unbind -n S-Up
  92. unbind -n S-Down
  93. unbind -n S-Home
  94. unbind -n S-End
  95. unbind -n S-PageUp
  96. unbind -n S-PageDown
  97. #unbind -n S-Prior
  98. #inbind -n S-Next
  99. ############################################################################
  100. # Bindings
  101. ############################################################################
  102. # reload tmux conf
  103. bind-key r source-file ~/.tmux.conf
  104. #bind Escape copy-mode
  105. # new split in current pane (horizontal / vertical)
  106. bind-key - split-window -v # split pane horizontally
  107. bind-key | split-window -h # split pane vertically
  108. # list panes
  109. bind-key Space list-panes
  110. # list sessions
  111. bind-key S list-sessions
  112. # break-pane
  113. bind-key Enter break-pane
  114. # join-pane [-dhv] [-l size | -p percentage] [-s src-pane]
  115. # [-t:dst-window.dst-pane] (destination window (dot) destination pane
  116. # (alias: joinp)
  117. #
  118. #bind C-j command-prompt "joinp"
  119. #bind C-j command-prompt "join-pane"
  120. #bind-key j command-prompt "join-pane -s '%%'"
  121. #bind-key j command-prompt "joinp -t:0"
  122. bind-key Space command-prompt "joinp -t:%%" # %% = prompt for window.pane [-V|H] # vert|hor split
  123. # pane navigation
  124. # bind-key -n C-S-up prev # previous pane
  125. # bind-key -n C-S-down next # next pane
  126. # bind-key -n C-left prev
  127. # bind-key -n C-right next
  128. ############################################################################
  129. # windows
  130. ############################################################################
  131. #set-window-option -g window-status-current-bg red
  132. #bind C-j previous-window
  133. #bind C-k next-window
  134. bind-key C-b last-window # C-a C-a for last active window
  135. bind B command-prompt "rename-window %%"
  136. # By default, all windows in a session are constrained to the size of the
  137. # smallest client connected to that session,
  138. # even if both clients are looking at different windows.
  139. # It seems that in this particular case, Screen has the better default
  140. # where a window is only constrained in size if a smaller client
  141. # is actively looking at it.
  142. setw -g aggressive-resize on
  143. ############################################################################
  144. # panes
  145. ############################################################################
  146. # Navigation ---------------------------------------------------------------
  147. # use the emacs motion keys to move between panes
  148. #bind-key h select-pane -L
  149. #bind-key j select-pane -D
  150. #bind-key k select-pane -U
  151. #bind-key l select-pane -R
  152. # Resizing ---------------------------------------------------------------
  153. #bind-key C-h resize-pane -L
  154. #bind-key C-j resize-pane -D
  155. #bind-key C-k resize-pane -U
  156. #bind-key C-l resize-pane -R
  157. # use emacs motion keys while in copy mode
  158. setw -g mode-keys emacs
  159. ############################################################################
  160. # plugins
  161. ############################################################################
  162. set -g @plugin 'tmux-plugins/tmux-resurrect'
  163. ############################################################################
  164. # layouts
  165. ############################################################################
  166. #bind o select-layout "active-only"
  167. #bind M-- select-layout "even-vertical"
  168. #bind M-| select-layout "even-horizontal"
  169. #bind M-r rotate-window
  170. # focus on first window
  171. # select-window -t 0
  172. ############################################################################
  173. # true colours
  174. ############################################################################
  175. # set-option -ga terminal-overrides ",xterm-256color:Tc"
  176. set-option -ga terminal-overrides ",screen-24bits:Tc"
  177. set -g default-terminal "screen-256color"