TMUx
sudo apt-get install tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tmux-resurrect ~/.tmux/plugins/tmux-resurrect
git clone https://github.com/tmux-plugins/tmux-continuum /.tmux/plugins/tmux-continuum
npm install -g tmux-cpu
npm install -g tmux-mem
vim ~/.tmux.conf
set -g mouse on
$TMUX_PLUGIN_MANAGER_PATH='~/.tmux/plugins'
# tmux themepack
source-file "${HOME}/.tmux-themepack/powerline/block/gray.tmuxtheme"
bind -n F5 send-keys -t right 'htop' C-m
# copy to clipboard on copy tmux
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
set -g status-left-length 0
#set -g status-left ''
set-option -g status-position top
set -g status-justify left
set -g status-right-length 140
set -g @sysstat_mem_view_tmpl '#[fg=#{mem.color}]#{mem.used}#[default]/#{mem.total}'
set -g status-interval 5
set -g status-right '#{sysstat_mem}|#{sysstat_cpu}|#{sysstat_loadavg}|♪ #(exec amixer get Master|egrep -o "[0-9]+%" | egrep -o "[0-9]*")|♥#(acpi | cut -d ',' -f 2)|%a %m-%d %H:%M'
#set-window-option -g window-status-current-fg white
#set-window-option -g window-status-current-bg black
# default statusbar colors
#set -g status-fg white
#set -g status-bg default
#set -g status-attr bright
# List of plugins
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 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'samoshkin/tmux-plugin-sysstat'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# restore enviroment
set -g @continuum-restore on
# restore pane contents
set -g @resurrect-capture-pane-contents on
# save ~/.tmux.conf :q
tmux source ~/.tmux.conf
ctrl-b I para activar los plugins
========================================================================
ctrl-b Ctrl-s ---> guardar session
ctrl-b ctrl-r ----> restaurar session
tmux attach ---> me contecto a la ultima session
tmux list-sessions ---> lista de sessiones
tmux attach -t 4 ----> me conecto a la session 4
tmux kill-session -a ---> cerrar todas las otras sessiones
tmux kill-server -----> eliminar el servidor tmux
tmux send-keys -t right 'htop' C-m -----> ejecuta comando htop en el panel derecho
ctrl-b :detach -----> salir de lasession
ctrl-b shift : ----> para ingresar comando
ctrl-b shift 4 ----> cambiar nombre session
ctrl-b :new ---> nueva session
ctrl-b s -----> cambiar sesion list
ctrl-b x ----> cerrar panel
ctrl-b c ----> para crear nueva ventana
ctrl-b p ----> para ir ventana anterior
ctrl-b n ----> para ir ventana siguiente
ctrl-b 4 ----> para ir ventana 4
ctrl-b & ----> para cerrar ventana
ctrl-b " ----> abrir nueva ventana inferior
ctrl-b % ----> abrir nueva ventana derecha izquierda
ctrl-b space ----> redimenziona ventanas automaticamente
ctrl-b [ ----> para activar scroll para copiar
presione space donde se quiere iniciar
b para ir a la palabra anterior
w para ir a la siguiente palabra
0 para ir al inicio de linea
$ para ir al final de linea
? para buscar una palabra hacia atras
/ para buscar uan palabra hacia adelante
n para ir a la siguiente palabra de las palabras encontradas(cuando usas ? o /)
o para abrir un archivo que este seleccionado
ctrl-o para abrir en la terminal un archivo seleccionado
seleccionar la region para copiar presione enter
ctrl-b ] ----> para pegar
ctrl-b z ----> maximizar una region en una ventana dividido
ctrl-b w ----> ver todas las ventanas de la session
ctrl-b ? ----> lista de comandos