dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.tmux.conf

136 lines
4.8 KiB
Plaintext

# TERM
set -g default-terminal tmux-256color
set -ga terminal-overrides ",xterm-termite:Tc,xterm-256color:Tc"
set -ga terminal-overrides ",*col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
# Opciones basicas
set -g set-clipboard on
set -g mouse on
set -gq status-utf8 on
setw -gq utf8 on
set -g escape-time 0
set-option -g history-limit 102400
# Ventanas
set -g base-index 1
set -g renumber-windows on
set -g allow-rename on
setw -g automatic-rename on
# Panes
setw -g pane-base-index 1
setw -g aggressive-resize on
# Notificaciones
set -g monitor-activity on
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
set -g bell-action none
# Vi
set -g mode-keys vi
set -g status-keys vi
bind-key [ copy-mode
bind-key ] paste-buffer
# Statusbar
setw -g pane-border-status bottom
setw -g pane-border-format '─'
setw -g automatic-rename-format "#{s/zsh//:pane_current_command}"
setw -g pane-border-style 'fg=#080808'
setw -g pane-active-border-style 'fg=#080808'
set -g mode-style fg=black,bg=yellow
set -g message-command-style bg=colour0,fg=colour13
set -g message-style bg=default,fg=default
set -g status-style bg=default,fg=colour7
set -g set-titles on
set -g set-titles-string "#T"
set -g status-interval 1
set -g status-left ''
set -g status-right '#(txbar) #[fg=colour134]%a %d #[fg=colour167]%R #[fg=colour10]#S:#[fg=colour14]#I.#P'
set -g window-status-separator ' '
set -g window-status-current-style fg=colour3
set -g window-status-activity-style bg=colour0,fg=colour15
set -g window-status-format "#{=-15:?window_name,#{window_name},#{s/deadguy/home/:?pane_current_path,#{b:pane_current_path},}}"
set -g window-status-current-format "#{=-15:?window_name,#{window_name},#{s/deadguy/home/:?pane_current_path,#{b:pane_current_path},}}"
# Limpiar atajos
unbind-key -a
unbind-key C-b
unbind-key space
unbind-key '"'
unbind-key %
# Prefijo
set -g prefix M-a
bind-key M-a send-prefix
# Varios
bind-key D detach-client
bind-key : command-prompt
bind-key R respawn-window
bind-key T command-prompt 'rename-window %%'
bind-key S command-prompt 'rename-session %%'
bind-key r source-file $HOME/.tmux.conf \; display "Config Reloaded"
# Cambiar de pane usando alt-flecha sin prefijo
bind-key -n M-Left select-pane -L
bind-key -n M-Right select-pane -R
bind-key -n M-Up select-pane -U
bind-key -n M-Down select-pane -D
# Redimensionar usando alt-shift-flecha sin prefijo
bind-key -nr M-S-Left resize-pane -L 2
bind-key -nr M-S-Right resize-pane -R 2
bind-key -nr M-S-Up resize-pane -U 2
bind-key -nr M-S-Down resize-pane -D 2
bind-key -n M-z resize-pane -Z
# Trocar panes usando alt-shift-flecha con prefijo
bind-key M-S-Left swap-pane -s {left-of}
bind-key M-S-Right swap-pane -s {right-of}
bind-key M-S-Up swap-pane -U
bind-key M-S-Down swap-pane -D
# Dividir
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
bind-key / split-window -fh -c "#{pane_current_path}"
bind-key _ split-window -fv -c "#{pane_current_path}"
bind-key = select-layout even-vertical
# Cerrar
bind-key x kill-pane
bind-key X kill-window
bind-key Z kill-session
bind-key Q kill-server
# Movimiento de ventanas
bind-key -n C-left prev
bind-key -n C-right next
bind-key -n M-< swap-window -t -1
bind-key -n M-> swap-window -t +1
bind-key Enter new-window
bind-key Tab choose-window
bind-key d display-panes
bind-key w choose-tree -Zw "swap-window -t '%%'"
bind-key s choose-tree -Zw "swap-pane -t '%%'"
bind-key m choose-tree -Zw "move-pane -t '%%'"
# Copy/paste. Seleccionar texto con el mouse lo copia automaticamente al clipboard
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i -p -b"
bind-key -n M-S-v run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
# Prender y apagar statusbar
bind-key & set-option -g status
# Mejor soporte para mouse
set -g @prevent-scroll-for-fullscreen-alternate-buffer 'on'
set -g @scroll-speed-num-lines-per-scroll '3'
run-shell ~/bin/tmux-better-mouse-mode/scroll_copy_mode.tmux
# vim: set ft=tmux: