Last active
August 14, 2026 17:56
-
-
Save eduardoarandah/a2ca1c142f3ebec1bbf5f54e2904fcae to your computer and use it in GitHub Desktop.
awesome tmux config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================================================ | |
| # NOTES | |
| # ============================================================================ | |
| # Show help: prefix + ? | |
| # ============================================================================ | |
| # CONFIG MANAGEMENT | |
| # ============================================================================ | |
| # Reload config: F5 ( default: N/A ) | |
| bind F5 source-file ~/.tmux.conf \; display-message "Config reloaded!" | |
| # ============================================================================ | |
| # CORE SETTINGS | |
| # ============================================================================ | |
| # Set Prefix: Alt + a ( default: Ctrl + b ) | |
| set-option -g prefix M-a | |
| # Enable mouse support | |
| set -g mouse on | |
| # Remove escape delay ( vim support ) | |
| set -sg escape-time 0 | |
| # Increase scrollback buffer history | |
| set -g history-limit 10000 | |
| # Enable extended key support | |
| set-option -g xterm-keys on | |
| # Focus events enabled | |
| set-option -g focus-events on | |
| # Rename windows to current folder name | |
| set-option -g automatic-rename on | |
| set-option -g automatic-rename-format '#{b:pane_current_path}' | |
| # set-window-option -g automatic-rename on | |
| # set-option -g set-titles on | |
| # Terminal colors - uncomment one if needed: | |
| # set -g default-terminal tmux-256color | |
| # set -g default-terminal xterm-256color | |
| # set -g default-terminal screen-256color | |
| # set-option -sa terminal-overrides ',xterm-256color:RGB' | |
| # ============================================================================ | |
| # COPY MODE | |
| # ============================================================================ | |
| # Use Vi key bindings in copy mode | |
| setw -g mode-keys vi | |
| # Enter copy mode: Alt + c ( default: prefix + [ ) | |
| bind -n M-c copy-mode | |
| # Start selection: v ( default: Space ) | |
| bind -T copy-mode-vi v send -X begin-selection | |
| # Copy to clipboard: y ( default: Enter ) | |
| bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" | |
| bind -n M-e run-shell 'f=$(mktemp -t tmux-scrollback); tmux capture-pane -p -J -S - -t "#{pane_id}" > "$f"; tmux display-popup -E -w 90% -h 90% "nvim + \"$f\"; rm -f \"$f\""' | |
| # ============================================================================ | |
| # PANES | |
| # ============================================================================ | |
| # Split horizontal (side-by-side): Alt + v ( default: prefix + % ) | |
| bind -n M-v split-window -h -c "#{pane_current_path}" | |
| # Split vertical (top-bottom): Alt + s ( default: prefix + " ) | |
| bind -n M-s split-window -v -c "#{pane_current_path}" | |
| # Select pane Left: Alt + h ( default: prefix + Left ) | |
| bind -n M-h select-pane -L | |
| # Select pane Down: Alt + j ( default: prefix + Down ) | |
| bind -n M-j select-pane -D | |
| # Select pane Up: Alt + k ( default: prefix + Up ) | |
| bind -n M-k select-pane -U | |
| # Select pane Right: Alt + l ( default: prefix + Right ) | |
| bind -n M-l select-pane -R | |
| # Zoom pane: Alt + z ( default: prefix + z ) | |
| bind -n M-z resize-pane -Z | |
| # Kill pane: Alt + x ( default: prefix + x ) | |
| # bind -n M-x kill-pane | |
| # Rotate panes: Alt + r ( default: prefix + Ctrl + o ) | |
| bind -n M-r rotate-window | |
| # ============================================================================ | |
| # WINDOWS | |
| # ============================================================================ | |
| # Start window numbering at 1 | |
| set -g base-index 1 | |
| setw -g pane-base-index 1 | |
| # Renumber windows when one is closed | |
| set-option -g renumber-windows on | |
| # New window: Alt + t ( default: prefix + c ) | |
| bind -n M-t new-window -c "#{pane_current_path}" | |
| # New named window: Alt + Shift + t | |
| bind -n M-T command-prompt -p "Name:" "new-window -c '#{pane_current_path}' -n '%%'" | |
| # Rename window: Alt + , ( default: prefix + , ) | |
| bind -n M-, command-prompt "rename-window '%%'" | |
| # Swap window Left: Alt + Left ( default: N/A ) | |
| bind-key -n M-Left swap-window -t -1\; select-window -t -1 | |
| # Swap window Right: Alt + Right ( default: N/A ) | |
| bind-key -n M-Right swap-window -t +1\; select-window -t +1 | |
| # Next window: Alt + n ( default: prefix + n ) | |
| bind -n M-n next-window | |
| # Previous window: Alt + p ( default: prefix + p ) | |
| bind -n M-p previous-window | |
| # Select window 0: Alt + 0 ( default: prefix + 0 ) | |
| bind -n M-0 select-window -t 0 | |
| # Select window 1: Alt + 1 ( default: prefix + 1 ) | |
| bind -n M-1 select-window -t 1 | |
| # Select window 2: Alt + 2 ( default: prefix + 2 ) | |
| bind -n M-2 select-window -t 2 | |
| # Select window 3: Alt + 3 ( default: prefix + 3 ) | |
| bind -n M-3 select-window -t 3 | |
| # Select window 4: Alt + 4 ( default: prefix + 4 ) | |
| bind -n M-4 select-window -t 4 | |
| # Select window 5: Alt + 5 ( default: prefix + 5 ) | |
| bind -n M-5 select-window -t 5 | |
| # Select window 6: Alt + 6 ( default: prefix + 6 ) | |
| bind -n M-6 select-window -t 6 | |
| # Select window 7: Alt + 7 ( default: prefix + 7 ) | |
| bind -n M-7 select-window -t 7 | |
| # Select window 8: Alt + 8 ( default: prefix + 8 ) | |
| bind -n M-8 select-window -t 8 | |
| # Select window 9: Alt + 9 ( default: prefix + 9 ) | |
| bind -n M-9 select-window -t 9 | |
| # ============================================================================ | |
| # SESSIONS | |
| # ============================================================================ | |
| # Rename session: Alt + 4 ( default: prefix + $ ) | |
| # NOTE: This conflicts with 'Select window 4' above. One will override the other. | |
| # bind -n M-4 command-prompt -I "#{session_name}" "rename-session '%%'" | |
| # Detach session: Alt + d ( default: prefix + d ) | |
| bind -n M-d detach | |
| # Session/Window tree: Alt + w ( default: prefix + w ) | |
| bind -n M-w choose-tree -Zw | |
| # Activity | |
| set -g visual-activity off | |
| set -g visual-bell off | |
| set -g visual-silence off | |
| setw -g monitor-activity off # highlight windows with activity | |
| set -g bell-action none | |
| # DESIGN TWEAKS | |
| # Cyberdream colors | |
| #16181a bg | |
| #1e2124 bg_alt | |
| #3c4048 bg_highlight | |
| #ffffff fg | |
| #7b8496 grey | |
| #5ea1ff blue | |
| #5eff6c green | |
| #5ef1ff cyan | |
| #ff6e5e red | |
| #f1ff5e yellow | |
| #ff5ef1 magenta | |
| #ff5ea0 pink | |
| #ffbd5e orange | |
| #bd5eff purple | |
| ################################## | |
| # windows | |
| ################################## | |
| setw -g window-status-style 'fg=#5eff6c bg=#3c4048' | |
| setw -g window-status-format ' #I) #[fg=#ffffff]#W #[fg=#f1ff5e]#F ' | |
| setw -g window-status-bell-style 'fg=#16181a bg=#ff6e5e' | |
| # current window | |
| setw -g window-status-current-style 'fg=#16181a bg=#f1ff5e' | |
| setw -g window-status-current-format ' #I) #W #F ' | |
| ################################## | |
| # panes | |
| ################################## | |
| set -g pane-border-style 'fg=#ffffff' | |
| set -g pane-active-border-style 'fg=#f1ff5e' | |
| ################################## | |
| # statusbar | |
| ################################## | |
| set -g status-position bottom | |
| set -g status-justify left | |
| set -g status-style 'bg=#3c4048' | |
| ################################## | |
| # statusbar left | |
| ################################## | |
| set -g status-left-style 'fg=black bg=#5ea1ff' | |
| set -g status-left ' [ #S #(git -C "#{pane_current_path}" branch --show-current 2>/dev/null) ] ' | |
| set -g status-left-length 100 | |
| ################################## | |
| # statusbar right | |
| ################################## | |
| set -g status-right-style 'fg=white bg=#ff6e5e' | |
| # notifications on the right, test : tmux set -gq @notification "Your process stopped successfully" | |
| set -g status-right '#{?@notification, #{@notification} ,}' | |
| set -g status-interval 1 | |
| # click to dismiss | |
| bind -n MouseDown1StatusRight set -gu @notification | |
| ################################## | |
| # copy mode | |
| ################################## | |
| setw -g mode-style 'fg=#16181a bg=#f1ff5e' | |
| ################################## | |
| # session jumping | |
| ################################## | |
| bind -n M-o switch-client -p | |
| bind -n M-i switch-client -n | |
| # switch to last active session (back) | |
| bind -n M-b switch-client -l | |
| # Fuzzy jump to every window of every session | |
| bind -n M-f display-popup -E "tmux list-windows -a -F '#{session_name}:#{window_index} #{window_name}#{?window_active, *,}' | fzf --reverse | cut -d' ' -f1 | xargs -r tmux switch-client -t" | |
| # switch session with fuzzy selection | |
| bind -n M-F display-popup -E "tmux list-sessions -F '#{session_name}' | grep -v \"^$(tmux display -p '#S')\\$\" | fzf --reverse | xargs -r tmux switch-client -t" | |
| # open lazygit | |
| bind -n M-g if-shell -b '[ -d "#{pane_current_path}/.git" ]' 'display-popup -E -d "#{pane_current_path}" -w 95% -h 95% -T " lazygit " /opt/homebrew/bin/lazygit' 'display-message "not a git repo"' | |
| # command pallete | |
| bind -n M-. display-menu -T "#[align=centre] A list of my super amazing commands " -x C -y C \ | |
| "Clean terminals" l "run-shell -b '~/repos/dotfiles/scripts/tmux/clear-terminals.sh'" \ | |
| "Lazygit" g "new-window -n lazygit lazygit" \ | |
| "Neovim config" n "display-popup -E -w 90% -h 90% -d ~/.config/nvim 'nvim init.lua'" \ | |
| "Dotfiles" d "display-popup -E -w 90% -h 90% -d ~/repos/dotfiles 'nvim'" \ | |
| "Git reset" ! "display-popup -E -w 80% -h 80% 'git reset --hard; git clean -df; [ -f ~/kb/ascii/alv.txt ] && cat ~/kb/ascii/alv.txt; echo; echo Presiona cualquier tecla...; read -k1'" \ | |
| "Reload tmux config" r "source-file ~/.tmux.conf \; display-message 'Config reloaded!'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment