آخر نشاط 1 week ago Unlisted

Configuración moderna de tmux con mouse, true color, Catppuccin Mocha y atajos personalizados

تعديل c2d27dfc67101d531497f27f0d92dfede0e9886b

tmux.conf خام
1# ==========================================================
2# tmux.conf — Configuración Moderna
3# ==========================================================
4
5# -- Opciones generales ------------------------------------
6set -g default-terminal "tmux-256color"
7set -as terminal-features ",xterm-256color:RGB"
8set -g base-index 1
9setw -g pane-base-index 1
10set -g renumber-windows on
11set -g set-clipboard on
12set -g escape-time 10
13set -g history-limit 10000
14
15# -- Mouse & Vi Keys ---------------------------------------
16set -g mouse on
17set -g mode-keys vi
18
19# -- Prefix: Ctrl+a ----------------------------------------
20unbind C-b
21set -g prefix C-a
22bind C-a send-prefix
23bind a last-window
24
25# -- Split panes (Preservando el directorio actual) --------
26unbind '"'
27unbind %
28bind | split-window -h -c "#{pane_current_path}"
29bind - split-window -v -c "#{pane_current_path}"
30
31# -- Navegación Alt+hjkl -----------------------------------
32bind -n M-h select-pane -L
33bind -n M-j select-pane -D
34bind -n M-k select-pane -U
35bind -n M-l select-pane -R
36
37# -- Resize con Alt+Shift+hjkl -----------------------------
38bind -n M-H resize-pane -L 5
39bind -n M-J resize-pane -D 5
40bind -n M-K resize-pane -U 5
41bind -n M-L resize-pane -R 5
42
43# -- Modo copy (vi-style) ----------------------------------
44bind -T copy-mode-vi v send-keys -X begin-selection
45bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
46bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
47
48# -- Display-popup: lista sesiones con fzf -----------------
49bind 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 ------------------------------------------
52bind 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 -------------------------------------
61bind r source-file ~/.config/tmux/tmux.conf \; display-message "Configuración recargada"
62
63# -- Estilo Catppuccin Mocha (manual) ----------------------
64set -g status-left-length 100
65set -g status-right-length 100
66set -g status-style "bg=#1e1e2e"
67
68set -g message-style "bg=#45475a,fg=#cdd6f4"
69
70# Window status
71setw -g window-status-style "fg=#6c7086,bg=#1e1e2e"
72setw -g window-status-current-style "fg=#cba6f7,bg=#313244,bold"
73setw -g window-status-format " #I:#W "
74setw -g window-status-current-format " #I:#W "
75setw -g window-status-separator ""
76
77set -g status-left "#[fg=#181825,bg=#cba6f7,bold]  #S #[fg=#cba6f7,bg=#1e1e2e,nobold]"
78set -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'