Last active
September 24, 2017 18:31
-
-
Save jesusangelm/8113117 to your computer and use it in GitHub Desktop.
Mi configuracion de Tmux. Necesita algo de limpieza.
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
#configs para Tmux | |
#shell por defecto | |
#set -g default-command /bin/zsh | |
#set -g default-shell /bin/zsh | |
#tecla de prefijo de Tmux cambiada similar a Screen: Ctrl-a | |
#de Ctrl-b a Ctrl-a | |
set -g prefix C-a | |
#libera el prefijo original de Tmux Ctrl-b | |
unbind C-b | |
#configuracion del retraso entre el prefijo y el comando | |
set -sg escape-time 1 | |
#comienza numerando las ventanas desde el 1 | |
set -g base-index 1 | |
#comienza numerando los paneles desde el 1 | |
setw -g pane-base-index 1 | |
# re-enumera ventanas cuando se cierra una | |
set -g renumber-windows on | |
#recarga la configuracion de tmux y muestra un mensaje de confirmacion | |
bind r source-file ~/.tmux.conf \; display "~/.tmux.conf recargado!" | |
#asegura que podemos enviarle el comando Ctrl-a a otras apps | |
bind C-a send-prefix | |
#dividir la ventana horizontalmente | |
bind | split-window -h | |
#dividir la ventana verticalmente | |
bind - split-window -v | |
#movimiento entre los paneles como en Vim | |
# k | |
# h l | |
# j | |
# | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
#movimiento entre ventanas como en Vim | |
# | |
# prefijo + Ctrl-h prefijo + Ctrl-l | |
# <<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>> | |
# | |
bind -r C-h select-window -t :- | |
bind -r C-l select-window -t :+ | |
#redimencionado de paneles como las teclas de movimientos en Vim | |
bind -r H resize-pane -L 5 | |
bind -r J resize-pane -D 5 | |
bind -r K resize-pane -U 5 | |
bind -r L resize-pane -R 5 | |
#### me parece mas rapido redimencionar con las flechas de direccion | |
#integracion con el raton | |
setw -g mode-mouse on | |
#mas funciones para ejecutar con el raton | |
set -g mouse-select-pane on | |
set -g mouse-resize-pane on | |
set -g mouse-select-window on | |
#Compatibilidad con 256colores en la terminal | |
#set -g default-terminal "screen-256color" | |
#color de marcado del la ventana seleccionada | |
#setw -g window-status-current-bg red | |
#nombre de la sesion de tmux a la izquierda y sin [] | |
set -g status-left "Sesion: #S" | |
#muestra hasta un maximo de 40 caracteres en nombre de la sesion | |
#set -g status-left-length 40 | |
#hostname fecha y hora a la derecha | |
set -g status-right "#[fg=colour235,bg=colour252,bold] #H - %A %e %B %Y - %I:%M %p" | |
#Centrar la lista de ventanas | |
#set -g status-justify centre | |
#soporte de UTF-8 | |
set -g status-utf8 on | |
#frecuencia de actualizacion de la barra de estado en segundos | |
set -g status-interval 2 | |
#Modo Vi para Tmux | |
setw -g mode-keys vi | |
# portapapeles copiar | |
# Para copiar: | |
# - Presionas Ctrl A + [ para entrar en modo copiar. | |
# - Con el cursor mueves al inicio del contenido a copiar | |
# - Presionas ESPACIO para resaltar y seleccionar el texto a copiar | |
# - Presionas ENTER para salir | |
# - Presionas Ctrl A + Ctrl C para mandar el buffer de copiado de tmux al | |
# portapapeles | |
#bind C-c run "tmux save-buffer - | xclip -i -selection clipboard" | |
bind C-c run "tmux show-buffer | xsel -i -b" | |
#portapapeles pegar | |
#bind C-v run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer" | |
bind C-v run "tmux set-buffer -- \"$(xsel -o -b)\"; tmux paste-buffer" | |
############################################################# | |
############################################################# | |
#mejora el scroll con las teclas shift-PageUp/shift-PageDown | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
#setw -g aggressive-resize on | |
#### Barra inferior similar a Powerline | |
if-shell 'test -z "$POWERLINE_COMMAND"' 'if-shell "which powerline-client" "set-environment -g POWERLINE_COMMAND powerline-client" "set-environment -g POWERLINE_COMMAND powerline"' | |
set -g status on | |
set -g status-utf8 on | |
set -g status-interval 2 | |
set -g status-fg colour231 | |
set -g status-bg colour234 | |
set -g status-left-length 20 | |
set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold]#(eval $POWERLINE_COMMAND tmux left)' | |
set -g status-right '#(eval $POWERLINE_COMMAND tmux right -R pane_id=`tmux display -p "#D"`)' | |
set -g status-right-length 150 | |
set -g window-status-format "#[fg=colour244,bg=colour234]#I #[fg=colour240] #[default]#W " | |
set -g window-status-current-format "#[fg=colour234,bg=colour31]#[fg=colour117,bg=colour31] #I #[fg=colour231,bold]#W #[fg=colour31,bg=colour234,nobold]" | |
set-window-option -g window-status-fg colour249 | |
set-window-option -g window-status-activity-attr none | |
set-window-option -g window-status-bell-attr none | |
set-window-option -g window-status-activity-fg yellow | |
set-window-option -g window-status-bell-fg red |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gracias por compartir!