Advertisement
ucomesdag

.tmux.conf

Oct 19th, 2022 (edited)
976
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.36 KB | None | 0 0
  1. # Enable mouse support
  2. set -g mouse on
  3.  
  4. # Set the history limit
  5. set -g history-limit 100000
  6.  
  7. # Remap prefix from 'C-b' to 'C-Space'
  8. unbind C-b
  9. set -g prefix C-Space
  10.  
  11. # Set the delay between prefix and command
  12. set -s escape-time 5
  13.  
  14. # Create new window with 'w'
  15. unbind w  #Default key: change current window interactively
  16. bind w new-window -c "#{pane_current_path}"
  17.  
  18. # Remane window with 'n'
  19. unbind n  #Default key: Move to next window
  20. bind n command-prompt "rename-window '%%'"
  21.  
  22. # Set automatic renameing
  23. set -g allow-rename on
  24.  
  25. # Prompt to rename window right after it's created
  26. set-hook -g after-new-window 'command-prompt -I "#{window_name}" "rename-window '%%'"'
  27.  
  28. # Split panes using | and -
  29. unbind '"'
  30. bind - split-window -v
  31. unbind %
  32. bind \\ split-window -h
  33.  
  34. # Switch panes using Alt-arrow without prefix
  35. bind-key -n M-Left select-pane -L
  36. bind-key -n M-Right select-pane -R
  37. bind-key -n M-Up select-pane -U
  38. bind-key -n M-Down select-pane -D
  39.  
  40. # Resizing panes panes using Shift-arrow without prefix
  41. bind-key -n S-Left resize-pane -L 5
  42. bind-key -n S-Right resize-pane -R 5
  43. bind-key -n S-Up resize-pane -U 5
  44. bind-key -n S-Down resize-pane -D 5
  45.  
  46. # Set C-r to reload this configuration file
  47. unbind r
  48. bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
  49.  
  50. # Set parent terminal title to reflect current window in tmux session
  51. # set -g set-titles on
  52. # set -g set-titles-string "#I:#W"
  53.  
  54. # Start index of window/pane with 1, because we're humans, not computers
  55. set -g base-index 1
  56. setw -g pane-base-index 1
  57.  
  58. # Set vi as the default editor
  59. set -g status-keys vi
  60.  
  61. # Set copy mode naviagtion to vi
  62. set-window-option -g mode-keys vi
  63.  
  64. # Set select to v
  65. unbind -T copy-mode-vi Space
  66. bind -T copy-mode-vi v send-keys -X begin-selection
  67.  
  68. # Set copy to y and pipe buffer to clipboard
  69. unbind -T copy-mode-vi Enter
  70. bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel --clipboard"
  71.  
  72. #####################
  73. ### STYLE CHANGES ###
  74. #####################
  75.  
  76. # Print color names
  77. # for i in {0..255}; do  printf "\x1b[38;5;${i}mcolor%-5i\x1b[0m" $i ; if ! (( ($i + 1 ) % 8 )); then echo ; fi ; done
  78.  
  79. # loud or quiet?
  80. set -g visual-activity off
  81. set -g visual-bell off
  82. set -g visual-silence off
  83. setw -g monitor-activity off
  84. set -g bell-action none
  85.  
  86. #  modes
  87. setw -g clock-mode-style 24
  88. setw -g clock-mode-color color220
  89. setw -g mode-style 'bg=color250 fg=color0' # selection style
  90.  
  91. # panes
  92. set -g pane-border-style 'bg=color232 fg=color238'
  93. set -g pane-active-border-style 'bg=color0 fg=color250'
  94. set -g pane-border-status off
  95. # set -g pane-border-status top
  96. # set -g pane-border-format "#P: #{pane_current_command}"
  97.  
  98. # statusbar
  99. set -g status-position bottom
  100. set -g status-justify left
  101. set -g status-style 'bg=color232 fg=color250 '
  102. set -g status-left ''
  103. set -g status-right '#[bg=color40,fg=color232] %d/%m #[bg=color39,fg=color232] %H:%M:%S '
  104. set -g status-right-length 50
  105. set -g status-left-length 20
  106.  
  107. setw -g window-status-current-style 'bg=color220,fg=color235 bold'
  108. setw -g window-status-current-format ' #I#[fg=color235]:#[fg=color232]#W#[fg=color235]#F '
  109.  
  110. setw -g window-status-style 'bg=color240 fg=color247'
  111. setw -g window-status-format ' #I#[fg=color247]:#[fg=color255]#W#[fg=color247]#F '
  112.  
  113. setw -g window-status-bell-style 'fg=color255 bg=color1 bold'
  114.  
  115. # messages
  116. set -g message-style 'fg=color232 bg=color220 bold'
  117.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement