.tmux.conf 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # ██████████ ████ ████ ██ ██ ██ ██
  2. # ░░░░░██░░░ ░██░██ ██░██░██ ░██░░██ ██
  3. # ░██ ░██░░██ ██ ░██░██ ░██ ░░██ ██
  4. # ░██ ░██ ░░███ ░██░██ ░██ ░░███
  5. # ░██ ░██ ░░█ ░██░██ ░██ ██░██
  6. # ░██ ░██ ░ ░██░██ ░██ ██ ░░██
  7. # ░██ ░██ ░██░░███████ ██ ░░██
  8. # ░░ ░░ ░░ ░░░░░░░ ░░ ░░
  9. #
  10. # ▓▓▓▓▓▓▓▓▓▓
  11. # ░▓ Author ▓ AK <abdullah@abdullah.today>
  12. # ░▓▓▓▓▓▓▓▓▓▓
  13. # ░░░░░░░░░░
  14. # source powerline
  15. # source /usr/lib/python3.8/site-packages/powerline/bindings/tmux/powerline.conf
  16. # Custom Prefix
  17. unbind C-b
  18. set-option -g prefix `
  19. bind ` send-prefix
  20. # Shell
  21. set -g default-command $SHELL
  22. set -g default-shell $SHELL
  23. # Reload the config
  24. bind r source-file ~/.tmux.conf \; display "~/.tmux.conf reloaded"
  25. # Synchronize panes
  26. bind e setw synchronize-panes \; display "synchronize mode"
  27. # Splits
  28. unbind %
  29. unbind '"'
  30. bind b split-window -v
  31. bind v split-window -h
  32. # Panes numbers
  33. set -g display-panes-active-colour colour20
  34. set -g display-panes-colour colour196
  35. # enable vi-mode
  36. setw -g mode-keys vi
  37. set -g status-keys vi
  38. # copy paste
  39. unbind [
  40. bind Escape copy-mode
  41. unbind p
  42. bind p paste-buffer
  43. bind-key -T copy-mode-vi 'v' send -X begin-selection
  44. bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
  45. # command mode
  46. bind : command-prompt
  47. # Kill panes
  48. bind x kill-pane
  49. # Toggle Status
  50. bind t set status
  51. # Lock the tty
  52. # bind b run-shell "$HOME/.local/bin/unilock"
  53. # Alerts
  54. setw -g monitor-activity on
  55. set -g visual-activity on
  56. # Enable mouse mode
  57. setw -g mouse on
  58. setw -qg mode-mouse on
  59. set -qg mouse-select-pane on
  60. set -qg mouse-resize-pane on
  61. set -qg mouse-select-window on
  62. set -qg mouse-utf8 on
  63. set -qg mouse on
  64. # Default terminal mode
  65. set -g default-terminal 'xterm-256color'
  66. set -sa terminal-overrides ',xterm-256color:RGB'
  67. # Status and colors
  68. set -g status on
  69. set -g status-justify left
  70. set -g status-interval 2
  71. set -qg status-utf on
  72. set -g status-style fg=colour130,bg=colour235
  73. setw -g automatic-rename on
  74. setw -g window-status-style bg=default,fg=colour33
  75. setw -g window-status-current-style bg=default,fg=colour196
  76. # HJKL / vi-like pane traversal
  77. bind h select-pane -L
  78. bind j select-pane -D
  79. bind k select-pane -U
  80. bind l select-pane -R
  81. # Resize panes
  82. bind -r H resize-pane -L 5
  83. bind -r J resize-pane -D 5
  84. bind -r K resize-pane -U 5
  85. bind -r L resize-pane -R 5
  86. # Right status
  87. set -g status-right-length 150
  88. set -g status-right '#(~/.local/bin/tmux-status)'
  89. set -g status-left-length 75
  90. set -g status-left ''
  91. # Visuals
  92. setw -g monitor-activity off
  93. set-option -g bell-action none
  94. set-option -g visual-activity on
  95. set-option -g visual-bell off
  96. set-option -g visual-silence off
  97. # clock
  98. set -g clock-mode-colour colour20
  99. # urlview
  100. run-shell $HOME/.local/bin/tmux.urlview
  101. # resize panes
  102. setw -g aggressive-resize on
  103. # No delay
  104. set -sg escape-time 0
  105. # History
  106. set -g history-limit 10000
  107. # Scrolling
  108. set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
  109. # Panes index
  110. set -g pane-base-index 1
  111. set -g renumber-windows on
  112. # Pane numbers
  113. set -g display-panes-active-colour colour20
  114. set -g display-panes-colour colour196
  115. # Pane borders
  116. # set-option -g pane-border-fg colour235
  117. # set-option -g pane-active-border-fg colour46
  118. set -g pane-border-style fg=green,bg=black
  119. set -g pane-active-border-style fg=white,bg=yellow
  120. # Windows index
  121. set -g base-index 1
  122. # Layouts
  123. bind Z previous-layout
  124. bind X next-layout
  125. # Detach others
  126. bind D detach -a
  127. # Update environments
  128. set -g update-environment "DBUS_SESSION_BUS_ADDRESS DISPLAY SSH_AUTH_SOCK XAUTHORITY"
  129. # Message text
  130. set -g message-style bg=colour235,fg=colour196