f1lam3ntx0

Tmux configuration

Jun 26th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 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-a
  8. unbind-key C-a
  9. bind-key C-a 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. # Automatically set window title
  27. set-window-option -g automatic-rename on
  28. set-option -g set-titles on
  29.  
  30.  
  31. # Key bindings for copy-paste
  32. setw -g mode-keys vi
  33. unbind p
  34. bind p paste-buffer
  35. bind-key -t vi-copy 'v' begin-selection
  36. bind-key -t vi-copy 'y' copy-selection
  37. set-option -g renumber-windows on
  38.  
  39.  
  40. # Window activity monitor
  41. setw -g monitor-activity on
  42. set -g visual-activity on
  43.  
  44.  
  45. # Set easier window split keys
  46. bind-key v split-window -h
  47. bind-key h split-window -v
  48.  
  49.  
  50. # Use Alt-arrow keys without prefix key to switch panes
  51. bind -n M-Left select-pane -L
  52. bind -n M-Right select-pane -R
  53. bind -n M-Up select-pane -U
  54. bind -n M-Down select-pane -D
  55.  
  56.  
  57. # Allow the arrow key to be used immediately after changing windows.
  58. set-option -g repeat-time 0
  59.  
  60. # Shift arrow to switch windows
  61. bind -n S-Left previous-window
  62. bind -n S-Right next-window
  63.  
  64.  
  65. # Double press <prefix> to move to last window
  66. bind-key C-b last-window
  67.  
  68. # No delay for escape key press
  69. set -sg escape-time 0
  70.  
  71.  
  72. # Window activity monitor
  73. setw -g monitor-activity on
  74. set -g visual-activity on
  75.  
  76.  
  77. # Mouse Mode
  78. set -g mode-mouse on
  79. set -g mouse-resize-pane on
  80. set -g mouse-select-pane on
  81. set -g mouse-select-window on
  82. set -g history-limit 10000
  83.  
  84. # Theme
  85. set -g window-status-current-bg green
  86. set -g window-status-current-fg black
  87. set -g window-status-current-attr bold
  88. set-option -g message-bg colour237
  89. set-option -g message-fg colour231
  90. set-option -g pane-border-fg green
  91. set-option -g pane-active-border-fg green
  92.  
  93. # Status Bar
  94. set -g status-justify centre
  95. set -g status-bg black
  96. set -g status-fg white
  97. set -g status-interval 60
  98. set -g status-left-length 30
  99. set -g status-left '#[fg=green][#S] #(whoami)@#H'
  100. set -g status-right '#[fg=green]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=green]%H:%M'
Add Comment
Please, Sign In to add comment