tmux.conf
· 3.0 KiB · Text
Surowy
# ==========================================================
# tmux.conf — Configuración Moderna
# ==========================================================
# -- Opciones generales ------------------------------------
set -g default-terminal "tmux-256color"
set -as terminal-features ",xterm-256color:RGB"
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g set-clipboard on
set -g escape-time 10
set -g history-limit 10000
# -- Mouse & Vi Keys ---------------------------------------
set -g mouse on
set -g mode-keys vi
# -- Prefix: Ctrl+a ----------------------------------------
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind a last-window
# -- Split panes (Preservando el directorio actual) --------
unbind '"'
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# -- Navegación Alt+hjkl -----------------------------------
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# -- Resize con Alt+Shift+hjkl -----------------------------
bind -n M-H resize-pane -L 5
bind -n M-J resize-pane -D 5
bind -n M-K resize-pane -U 5
bind -n M-L resize-pane -R 5
# -- Modo copy (vi-style) ----------------------------------
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
# -- Display-popup: lista sesiones con fzf -----------------
bind S display-popup -E -w 90% -h 90% "tmux list-sessions | fzf --header='Sessions' | cut -d: -f1 | xargs tmux switch-client -t"
# -- Display-menu ------------------------------------------
bind m display-menu -T "#[align=centre fg=#cba6f7] tmux " -x C -y S \
" New Window" w "new-window" \
" New Session" s "new-session" \
" ⛶ Kill Pane" x "kill-pane" \
" Kill Window" X "kill-window" \
" Reload" r "source-file ~/.config/tmux/tmux.conf" \
" Detach" d "detach-client"
# -- Recarga de config -------------------------------------
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Configuración recargada"
# -- Estilo Catppuccin Mocha (manual) ----------------------
set -g status-left-length 100
set -g status-right-length 100
set -g status-style "bg=#1e1e2e"
set -g message-style "bg=#45475a,fg=#cdd6f4"
# Window status
setw -g window-status-style "fg=#6c7086,bg=#1e1e2e"
setw -g window-status-current-style "fg=#cba6f7,bg=#313244,bold"
setw -g window-status-format " #I:#W "
setw -g window-status-current-format " #I:#W "
setw -g window-status-separator ""
set -g status-left "#[fg=#181825,bg=#cba6f7,bold] #S #[fg=#cba6f7,bg=#1e1e2e,nobold]"
set -g status-right "#[fg=#a6e3a1] #(uname -r | cut -d. -f1,2) #[fg=#89b4fa] #(date +%H:%M) #[fg=#fab387]"
# -- TPM (Tmux Plugin Manager) -----------------------------
# set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'tmux-plugins/tmux-yank'
# run '~/.config/tmux/plugins/tpm/tpm'
| 1 | # ========================================================== |
| 2 | # tmux.conf — Configuración Moderna |
| 3 | # ========================================================== |
| 4 | |
| 5 | # -- Opciones generales ------------------------------------ |
| 6 | set -g default-terminal "tmux-256color" |
| 7 | set -as terminal-features ",xterm-256color:RGB" |
| 8 | set -g base-index 1 |
| 9 | setw -g pane-base-index 1 |
| 10 | set -g renumber-windows on |
| 11 | set -g set-clipboard on |
| 12 | set -g escape-time 10 |
| 13 | set -g history-limit 10000 |
| 14 | |
| 15 | # -- Mouse & Vi Keys --------------------------------------- |
| 16 | set -g mouse on |
| 17 | set -g mode-keys vi |
| 18 | |
| 19 | # -- Prefix: Ctrl+a ---------------------------------------- |
| 20 | unbind C-b |
| 21 | set -g prefix C-a |
| 22 | bind C-a send-prefix |
| 23 | bind a last-window |
| 24 | |
| 25 | # -- Split panes (Preservando el directorio actual) -------- |
| 26 | unbind '"' |
| 27 | unbind % |
| 28 | bind | split-window -h -c "#{pane_current_path}" |
| 29 | bind - split-window -v -c "#{pane_current_path}" |
| 30 | |
| 31 | # -- Navegación Alt+hjkl ----------------------------------- |
| 32 | bind -n M-h select-pane -L |
| 33 | bind -n M-j select-pane -D |
| 34 | bind -n M-k select-pane -U |
| 35 | bind -n M-l select-pane -R |
| 36 | |
| 37 | # -- Resize con Alt+Shift+hjkl ----------------------------- |
| 38 | bind -n M-H resize-pane -L 5 |
| 39 | bind -n M-J resize-pane -D 5 |
| 40 | bind -n M-K resize-pane -U 5 |
| 41 | bind -n M-L resize-pane -R 5 |
| 42 | |
| 43 | # -- Modo copy (vi-style) ---------------------------------- |
| 44 | bind -T copy-mode-vi v send-keys -X begin-selection |
| 45 | bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel |
| 46 | bind -T copy-mode-vi C-v send-keys -X rectangle-toggle |
| 47 | |
| 48 | # -- Display-popup: lista sesiones con fzf ----------------- |
| 49 | bind S display-popup -E -w 90% -h 90% "tmux list-sessions | fzf --header='Sessions' | cut -d: -f1 | xargs tmux switch-client -t" |
| 50 | |
| 51 | # -- Display-menu ------------------------------------------ |
| 52 | bind m display-menu -T "#[align=centre fg=#cba6f7] tmux " -x C -y S \ |
| 53 | " New Window" w "new-window" \ |
| 54 | " New Session" s "new-session" \ |
| 55 | " ⛶ Kill Pane" x "kill-pane" \ |
| 56 | " Kill Window" X "kill-window" \ |
| 57 | " Reload" r "source-file ~/.config/tmux/tmux.conf" \ |
| 58 | " Detach" d "detach-client" |
| 59 | |
| 60 | # -- Recarga de config ------------------------------------- |
| 61 | bind r source-file ~/.config/tmux/tmux.conf \; display-message "Configuración recargada" |
| 62 | |
| 63 | # -- Estilo Catppuccin Mocha (manual) ---------------------- |
| 64 | set -g status-left-length 100 |
| 65 | set -g status-right-length 100 |
| 66 | set -g status-style "bg=#1e1e2e" |
| 67 | |
| 68 | set -g message-style "bg=#45475a,fg=#cdd6f4" |
| 69 | |
| 70 | # Window status |
| 71 | setw -g window-status-style "fg=#6c7086,bg=#1e1e2e" |
| 72 | setw -g window-status-current-style "fg=#cba6f7,bg=#313244,bold" |
| 73 | setw -g window-status-format " #I:#W " |
| 74 | setw -g window-status-current-format " #I:#W " |
| 75 | setw -g window-status-separator "" |
| 76 | |
| 77 | set -g status-left "#[fg=#181825,bg=#cba6f7,bold] #S #[fg=#cba6f7,bg=#1e1e2e,nobold]" |
| 78 | set -g status-right "#[fg=#a6e3a1] #(uname -r | cut -d. -f1,2) #[fg=#89b4fa] #(date +%H:%M) #[fg=#fab387]" |
| 79 | |
| 80 | # -- TPM (Tmux Plugin Manager) ----------------------------- |
| 81 | # set -g @plugin 'tmux-plugins/tpm' |
| 82 | # set -g @plugin 'tmux-plugins/tmux-sensible' |
| 83 | # set -g @plugin 'tmux-plugins/tmux-yank' |
| 84 | # run '~/.config/tmux/plugins/tpm/tpm' |