Last active
December 11, 2024 19:37
-
-
Save lesm/55eff8569a58f7623cf2 to your computer and use it in GitHub Desktop.
Configuración personal de tmux
This file contains 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
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @plugin 'christoomey/vim-tmux-navigator' | |
set -g @continuum-restore 'on' | |
set -g @resurrect-capture-pane-contents 'on' | |
set -g @resurrect-strategy-nvim 'session' | |
# Set the default terminal mode to 256 colors for better compatibility | |
set -g default-terminal "screen-256color" | |
# Improve refresh rate and performance | |
set -s escape-time 10 | |
# Allow window renaming based on the command running | |
set-option -g allow-rename on | |
# enable scrolling in tmux panels and windows | |
set -g mouse off | |
# Set pane borders and status bar colors | |
set-option -g pane-border-style fg=default | |
set-option -g pane-active-border-style fg=brightblue | |
# Customize status line | |
set-option -g status-interval 5 | |
set-option -g status-position top | |
set-option -g status-left-length 40 | |
set-option -g status-right-length 120 | |
set-option -g status-justify centre | |
# Status line colors | |
set-option -g status-style bg=black,fg=white | |
# Left side of the status bar | |
set-option -g status-left "#[bg=brightblue,fg=white] #S #[default]" | |
# Set the status bar to the bottom | |
set-option -g status-position bottom | |
# Right side of the status bar with CPU and memory load | |
set-option -g status-right "#[fg=green]#(whoami) | #(hostname) #[fg=yellow] %H:%M %d-%b-%y #[fg=cyan] #(uptime | cut -d ',' -f 1) #[fg=blue] CPU: #(top -bn1 | grep 'Cpu(s)' | sed 's/.*, *\\([0-9.]*\\)%* id.*/\\1/' | awk '{print 100 - \\1}')%% MEM: #(free | grep Mem | awk '{print $3/$2 * 100.0}')%%" | |
# Highlight the active window and pane | |
setw -g window-status-current-style bg=blue,fg=white | |
setw -g window-status-current-format "#[bold]#[fg=brightblue]#I #[default]#W" | |
# Numbering and renaming settings | |
setw -g automatic-rename on | |
setw -g automatic-rename-format "#T" | |
set -g renumber-windows on | |
# Reload tmux config with prefix + r | |
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded!" | |
# Enable copy-paste to the system clipboard (Linux) | |
if-shell 'command -v xclip >/dev/null 2>&1' 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -in"' | |
if-shell 'command -v xclip >/dev/null 2>&1' 'bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -in"' | |
# Enable copy-paste to the macOS clipboard | |
if-shell 'command -v pbcopy >/dev/null 2>&1' 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"' | |
if-shell 'command -v pbcopy >/dev/null 2>&1' 'bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"' | |
# Better history for copy mode | |
set -g history-limit 50000 | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment