Advertisement
jlacroix

tmux configuration

Jun 2nd, 2015
6,138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.36 KB | None | 0 0
  1. # Initial setup
  2. set -g default-terminal xterm-256color
  3. set -g status-keys vi
  4.  
  5.  
  6. # Prefix
  7. set-option -g prefix C-j
  8. unbind-key C-j
  9. bind-key C-j send-prefix
  10. set -g base-index 1
  11.  
  12.  
  13. # Easy config reload
  14. bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
  15.  
  16.  
  17. # Easy clear history
  18. bind-key L clear-history
  19.  
  20.  
  21. # Lengthen the amount of time status messages are displayed
  22. set-option -g display-time 2000
  23. set-option -g display-panes-time 3000
  24.  
  25.  
  26. # Set the base-index to 1 rather than 0
  27. set -g base-index 1
  28. set-window-option -g pane-base-index 1
  29.  
  30.  
  31. # Automatically set window title
  32. set-window-option -g automatic-rename on
  33. set-option -g set-titles on
  34.  
  35.  
  36. # Key bindings for copy-paste
  37. setw -g mode-keys vi
  38. unbind p
  39. bind p paste-buffer
  40. bind-key -t vi-copy 'v' begin-selection
  41. bind-key -t vi-copy 'y' copy-selection
  42. set-option -g renumber-windows on
  43.  
  44.  
  45. # Window activity monitor
  46. setw -g monitor-activity on
  47. set -g visual-activity on
  48.  
  49.  
  50. # Set easier window split keys
  51. bind-key v split-window -h
  52. bind-key h split-window -v
  53.  
  54.  
  55. # Use Alt-arrow keys without prefix key to switch panes
  56. bind -n M-Left select-pane -L
  57. bind -n M-Right select-pane -R
  58. bind -n M-Up select-pane -U
  59. bind -n M-Down select-pane -D
  60.  
  61.  
  62. # Allow the arrow key to be used immediately after changing windows.
  63. set-option -g repeat-time 0
  64.  
  65. # Shift arrow to switch windows
  66. bind -n S-Left  previous-window
  67. bind -n S-Right next-window
  68.  
  69.  
  70. # Double press <prefix> to move to last window
  71. bind-key C-b last-window
  72.  
  73. # No delay for escape key press
  74. set -sg escape-time 0
  75.  
  76.  
  77. # Window activity monitor
  78. setw -g monitor-activity on
  79. set -g visual-activity on
  80.  
  81.  
  82. # Mouse Mode
  83. set -g mode-mouse on
  84. set -g mouse-resize-pane on
  85. set -g mouse-select-pane on
  86. set -g mouse-select-window on
  87. set -g history-limit 10000
  88.  
  89. # Theme
  90. set -g window-status-current-bg green
  91. set -g window-status-current-fg black
  92. set -g window-status-current-attr bold
  93. set-option -g message-bg colour237
  94. set-option -g message-fg colour231
  95. set-option -g pane-border-fg green
  96. set-option -g pane-active-border-fg green
  97.  
  98. # Status Bar
  99. set -g status-justify centre
  100. set -g status-bg black
  101. set -g status-fg white
  102. set -g status-interval 60
  103. set -g status-left-length 30
  104. set -g status-left '#[fg=green][#S] #(whoami)@#H'
  105. set -g status-right '#[fg=green]#(cut -d " " -f 1-3 /proc/loadavg)#[default]  #[fg=green]%H:%M'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement