Advertisement
Guest User

tmux config

a guest
Dec 28th, 2024
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | Source Code | 0 0
  1. ###############################################
  2. ### SETTINGS
  3. ###############################################
  4. set -g mouse on
  5. set -g base-index 1
  6. set -g pane-base-index 1
  7. set-window-option -g pane-base-index 2
  8. set-option -g renumber-windows on
  9. set-window-option -g mode-keys vi
  10. set -ga terminal-overrides ",xterm-256color:Tc"
  11. set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
  12. set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
  13. set-option -g history-limit 100000
  14. # set -g detach-on-destroy off # don't exit from tmux when closing a session
  15.  
  16. ###############################################
  17. ### KEYMAPS
  18. ###############################################
  19. unbind C-b
  20. set -g prefix C-a
  21. bind C-a send-prefix
  22.  
  23. bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded" # Reload configuration
  24.  
  25. bind -n C-n next-window
  26. bind -n C-p previous-window
  27.  
  28. # Spliting window
  29. bind | split-window -h -c "#{pane_current_path}"
  30. bind - split-window -v -c "#{pane_current_path}"
  31. unbind '"'
  32. unbind %
  33.  
  34. bind Q confirm-before -p "kill-session #S? (y/n)" kill-session
  35. bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
  36.  
  37. bind C-c copy-mode
  38. bind -T copy-mode-vi v send-keys -X begin-selection
  39. bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
  40.  
  41. bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
  42. bind C-t run-shell "sesh connect \"$(
  43. sesh list --icons | fzf-tmux -p 55%,60% \
  44. --no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \
  45. --header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
  46. --bind 'tab:down,btab:up' \
  47. --bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \
  48. --bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \
  49. --bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \
  50. --bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \
  51. --bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
  52. --bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \
  53. )\""
  54.  
  55. bind-key g new-window -c "#{pane_current_path}" -n "🌳" "lazygit 2> /dev/null"
  56.  
  57. ###############################################
  58. ### PLUGINS
  59. ###############################################
  60. set -g @plugin 'tmux-plugins/tpm'
  61. set -g @plugin 'christoomey/vim-tmux-navigator'
  62. set -g @plugin 'catppuccin/tmux#v2.1.0'
  63. set -g @plugin 'wfxr/tmux-fzf-url'
  64. set -g @plugin 'tmux-plugins/tmux-resurrect'
  65.  
  66. set -g @catppuccin_flavor "mocha"
  67. set -g @catppuccin_window_status_style "rounded"
  68. set -g status-right-length 100
  69. set -g status-left-length 100
  70. set -g status-left ""
  71. set -g status-right "#{E:@catppuccin_status_application}"
  72. set -agF status-right "#{E:@catppuccin_status_cpu}"
  73. set -ag status-right "#{E:@catppuccin_status_session}"
  74. set -ag status-right "#{E:@catppuccin_status_uptime}"
  75. set -agF status-right "#{E:@catppuccin_status_battery}"
  76. set -g @catppuccin_flavor "mocha"
  77.  
  78. # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
  79. run '~/.tmux/plugins/tpm/tpm'
  80.  
Tags: tmuxx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement