|
| 1 | +# Tmux Configuration |
| 2 | +# Terminal multiplexer for session management and productivity |
| 3 | + |
| 4 | +# Load reset configuration first |
| 5 | +source-file ~/.config/tmux/tmux.reset.conf |
| 6 | + |
| 7 | +# Terminal settings |
| 8 | +set -g default-terminal 'screen-256color' |
| 9 | +set -g terminal-overrides ',xterm-256color:RGB' |
| 10 | +set -g set-titles on |
| 11 | +set -g set-titles-string '#{?#{m:[0-9]*,#S},tmux #{pane_current_path},#S}' |
| 12 | + |
| 13 | +# Core settings |
| 14 | +set -g mouse on # Enable mouse support |
| 15 | +set -g prefix C-g # Use Ctrl-Space as prefix key |
| 16 | +set -g base-index 1 # Start indexing windows at 1 instead of 0 |
| 17 | +setw -g pane-base-index 1 # Start indexing panes at 1 instead of 0 |
| 18 | +set -g detach-on-destroy off # Don't exit from tmux when closing a session |
| 19 | +set -g escape-time 0 # Zero-out escape time delay for faster key response |
| 20 | +set -g history-limit 1000000 # Increase history size (from default 2,000) |
| 21 | +set -g renumber-windows on # Renumber all windows when any window is closed |
| 22 | +set -g set-clipboard on # Use system clipboard |
| 23 | +set -g status-position top # macOS / darwin style status bar |
| 24 | +set -g default-terminal "${TERM}" |
| 25 | +setw -g mode-keys vi # Use vi-style key bindings |
| 26 | + |
| 27 | +# Pane settings |
| 28 | +set -g other-pane-height 25% |
| 29 | +set -g other-pane-width 80 |
| 30 | + |
| 31 | +# Status line configuration |
| 32 | +set -g status-right-length 100 # Increase right status length |
| 33 | +set -g status-left-length 100 # Increase left status length |
| 34 | +set -g status-left "" # Clear default left status |
| 35 | + |
| 36 | +# Pane border styling |
| 37 | +set -g pane-active-border-style 'fg=magenta,bg=default' # Active pane border |
| 38 | +set -g pane-border-style 'fg=brightblack,bg=default' # Inactive pane border |
| 39 | + |
| 40 | +# Plugin configurations |
| 41 | +set -g @fzf-url-fzf-options '-p 60%,30% --prompt=" " --border-label=" Open URL "' |
| 42 | +set -g @fzf-url-history-limit '2000' |
| 43 | + |
| 44 | +# Plugin management |
| 45 | +set -g @plugin 'tmux-plugins/tpm' # Tmux Plugin Manager |
| 46 | +set -g @plugin 'tmux-plugins/tmux-sensible' # Sensible default settings |
| 47 | +set -g @plugin 'tmux-plugins/tmux-yank' # Copy to system clipboard |
| 48 | +# set -g @plugin 'tmux-plugins/tmux-resurrect' # Save/restore sessions |
| 49 | +# set -g @plugin 'tmux-plugins/tmux-continuum' # Automatic session save/restore |
| 50 | + |
| 51 | +# Enhanced functionality plugins |
| 52 | +set -g @plugin 'sainnhe/tmux-fzf' # Fuzzy finder integration |
| 53 | +# set -g @plugin 'wfxr/tmux-fzf-url' # URL extraction and opening |
| 54 | +set -g @plugin 'josephschmitt/tmux-fzf-url' # URL extraction and opening |
| 55 | +set -g @plugin 'omerxx/catppuccin-tmux' # Catppuccin theme |
| 56 | +set -g @plugin 'christoomey/vim-tmux-navigator' # Seamless vim/tmux navigation |
| 57 | +set -g @plugin 'jabirali/tmux-tilish' # i3-like window management |
| 58 | + |
| 59 | +# Session persistence configuration |
| 60 | +# set -g @continuum-restore 'on' # Automatically restore sessions |
| 61 | +# set -g @resurrect-strategy-nvim 'session' # Save nvim sessions |
| 62 | + |
| 63 | +# Tilish plugin configuration (i3-like window management) |
| 64 | +set -g @tilish-default 'main-horizontal' |
| 65 | +set -g @tilish-enforce 'size' |
| 66 | + |
| 67 | +# URL handling |
| 68 | +set -g @fzf-url-history-limit '2000' # URL history limit |
| 69 | +set -g @fzf-url-sort-by 'recency' |
| 70 | + |
| 71 | +# Catppuccin theme configuration |
| 72 | +set -g @catppuccin_flavor "mocha" # Dark theme variant |
| 73 | +set -g @catppuccin_window_status_style "rounded" # Rounded window tabs |
| 74 | +set -g @catppuccin_status_background "none" # Transparent status background |
| 75 | + |
| 76 | +# Window tab styling |
| 77 | +set -g @catppuccin_window_left_separator "" # Left separator |
| 78 | +set -g @catppuccin_window_right_separator " " # Right separator |
| 79 | +set -g @catppuccin_window_middle_separator " █" # Middle separator |
| 80 | +set -g @catppuccin_window_number_position "right" # Window number position |
| 81 | +set -g @catppuccin_window_default_fill "number" # Default window fill |
| 82 | +set -g @catppuccin_window_default_text "#W" # Default window text |
| 83 | +set -g @catppuccin_window_current_fill "number" # Current window fill |
| 84 | +set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}" # Current window text with zoom indicator |
| 85 | + |
| 86 | +# Status line modules |
| 87 | +set -g @catppuccin_status_modules_right "directory date_time" # Right side modules |
| 88 | +set -g @catppuccin_status_modules_left "session" # Left side modules |
| 89 | +set -g @catppuccin_status_left_separator " " # Left separator |
| 90 | +set -g @catppuccin_status_right_separator " " # Right separator |
| 91 | +set -g @catppuccin_status_right_separator_inverse "no" # No inverse separator |
| 92 | +set -g @catppuccin_status_fill "icon" # Fill with icons |
| 93 | +set -g @catppuccin_status_connect_separator "no" # No connecting separator |
| 94 | + |
| 95 | +# Custom module content |
| 96 | +set -g @catppuccin_directory_text "#{b:pane_current_path}" # Show basename of current path |
| 97 | +set -g @catppuccin_date_time_text "#(date \"+%I:%M%p\" | tr \"[:upper:]\" \"[:lower:]\")" # Lowercase time format |
| 98 | + |
| 99 | +# Sesh session management |
| 100 | +bind-key "o" run-shell "sesh connect \"$( |
| 101 | + sesh list --icons | fzf-tmux -p 80%,70% \ |
| 102 | + --no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \ |
| 103 | + --header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \ |
| 104 | + --bind 'tab:down,btab:up' \ |
| 105 | + --bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \ |
| 106 | + --bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \ |
| 107 | + --bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \ |
| 108 | + --bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \ |
| 109 | + --bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \ |
| 110 | + --bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \ |
| 111 | + --preview-window 'right:55%' \ |
| 112 | + --preview 'sesh preview {}' |
| 113 | +)\"" |
| 114 | + |
| 115 | +# Initialize Tmux Plugin Manager (keep this line at the very bottom) |
| 116 | +run '~/.tmux/plugins/tpm/tpm' |
0 commit comments