sysadmin/configs/.tmux.conf

137 lines
4.5 KiB
Text
Raw Permalink Normal View History

# afx.tmux.conf 2017-2020
2017-09-15 14:11:31 -04:00
# unbind all does not recover the default binds but we can list them
# and fill the 'gaps' with manual rebind in the conf file using this command:
# tmux -f /dev/null -L temp start-server \; list-keys
unbind-key -a
set-option -g prefix F2 # ctrl+b => F2
#bind-key a send-key M-a # alt+a = alt+a+a
bind-key Left send-key M-Left
bind-key Right send-key M-Right
#set tab names
set-window-option -g automatic-rename on
set-option -g set-titles on
2018-06-29 10:53:20 -04:00
set -g set-titles-string "#(tmux ls | awk -F: '{print $1}' | xargs | sed 's/\ / | /g')"
2017-09-15 14:11:31 -04:00
set -g base-index 1 #0 is too far from ` ;)
set -g status-keys vi
set -g history-limit 50000
2017-09-15 14:11:31 -04:00
set -sg escape-time 0 #No delay for escape key press
set -g terminal-overrides "screen.xterm-new" #disable italic in searches
setw -g mode-keys vi
#setw -g mode-mouse off #tmux 1.9
2018-06-29 10:53:20 -04:00
set-option -g mouse off #tmux 2.1
2017-09-15 14:11:31 -04:00
bind-key r source-file ~/.tmux.conf \; display-message "] afx' .tmux.conf v8.1 (⌐■_■) ["
2017-09-15 14:11:31 -04:00
bind-key R refresh-client
bind-key : command-prompt
bind-key c new-window
bind-key w list-window
bind-key l next-layout
bind-key Space set-window-option main-pane-height 60 \; select-layout even-vertical \; display-message "layout reset to even vertical"
2017-09-15 14:11:31 -04:00
bind-key d detach
bind-key t clock-mode
bind-key n command-prompt 'rename-window %%'
bind-key x confirm-before -p "kill-pane #W? (y/n)" kill-pane
bind-key X confirm-before -p "kill-window #W? (y/n)" kill-window
bind-key N command-prompt 'rename-session %%'
bind-key f command-prompt "find-window '%%'"
bind-key S set-window-option synchronize-panes on \; display-message "Sync panes ON"
bind-key s set-window-option synchronize-panes off \; display-message "Sync panes OFF"
2017-09-15 14:11:31 -04:00
bind-key i display-message
bind-key q last-window
2017-09-15 14:11:31 -04:00
bind-key w choose-window
bind-key Escape copy-mode -u
bind-key Up copy-mode -u
bind-key | split-window -h
bind-key \\ split-window -h
2017-09-15 14:11:31 -04:00
bind-key = split-window -v
bind-key - split-window -v
#bind-key < swap-window -t :-
#bind-key > swap-window -t :+
bind-key 0 select-window -t :0
bind-key 1 select-window -t :1
bind-key 2 select-window -t :2
bind-key 3 select-window -t :3
bind-key 4 select-window -t :4
bind-key 5 select-window -t :5
bind-key 6 select-window -t :6
bind-key 7 select-window -t :7
bind-key 8 select-window -t :8
bind-key 9 select-window -t :9
# pane selection with Ctrl+ArrowKeys
bind -n C-Left select-pane -L
bind -n C-Right select-pane -R
bind -n C-Up select-pane -U
bind -n C-Down select-pane -D
# pane resize with Shift+ArrowKeys
bind -n S-Left resize-pane -L
bind -n S-Right resize-pane -R
bind -n S-Up resize-pane -U
bind -n S-Down resize-pane -D
# switch tabs with Alt+Comma and Alt+Dot
bind -n M-, previous-window
bind -n M-. next-window
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity on
set-option -g bell-action none
# THEME
set -g default-terminal "screen-256color"
set -g status-position top
set -g status-left ''
2018-06-29 10:53:20 -04:00
#set -g status-utf8 on
2017-09-15 14:11:31 -04:00
# Basic status bar colors
set -g status-fg colour240
set -g status-bg colour233
set -g status-style bright
2017-09-15 14:11:31 -04:00
# Left side of status bar
set -g status-left-length 40
2018-06-29 10:53:20 -04:00
set -g status-left "#[fg=colour232,bg=colour39,bold] #I:#P #[fg=colour233,bg=colour240] #(id -nu) "
2017-09-15 14:11:31 -04:00
# Right side of status bar
set -g status-right-length 150
set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour232,bg=colour245,bold] v8.1 "
2017-09-15 14:11:31 -04:00
# Window status
set -g window-status-format " #I:#W#F "
set -g window-status-current-format " #I:#W#F "
# Window with activity status
#set-window-option -g window-status-current-style bright
set-window-option -g window-status-current-style fg=colour232
set-window-option -g window-status-current-style bg=colour2
2017-09-15 14:11:31 -04:00
# Window separator
set -g window-status-separator ""
# Window status alignment
set -g status-justify centre
# Pane border
set-option -g pane-active-border-style bg=default
set-option -g pane-active-border-style fg=colour238
2017-09-15 14:11:31 -04:00
# Active pane border
set-option -g pane-active-border-style bg=default
set-option -g pane-active-border-style fg=colour39
2017-09-15 14:11:31 -04:00
# Pane number indicator
set -g display-panes-colour colour233
set -g display-panes-active-colour colour245
# Clock mode
set -g clock-mode-colour colour39
set -g clock-mode-style 24
# Message
set -g message-style bg=colour39
set -g message-style fg=red
2017-09-15 14:11:31 -04:00
# Command message
set -g message-command-style bg=colour233
set -g message-command-style fg=red
2017-09-15 14:11:31 -04:00
# Mode
set -g mode-style bg=colour39
set -g mode-style fg=colour232