# afx.tmux.conf 2017-2018 # 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 set -g set-titles-string "#(tmux ls | awk -F: '{print $1}' | xargs | sed 's/\ / | /g')" set -g base-index 1 #0 is too far from ` ;) set -g status-keys vi set -g history-limit 50000 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 set-option -g mouse off #tmux 2.1 bind-key r source-file ~/.tmux.conf \; display-message "] afx' .tmux.conf v7.3 (⌐■_■) [" 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" 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" bind-key i display-message bind-key q last-window 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 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 '' #set -g status-utf8 on # Basic status bar colors set -g status-fg colour240 set -g status-bg colour233 # Left side of status bar set -g status-left-bg colour233 set -g status-left-fg colour243 set -g status-left-length 40 set -g status-left "#[fg=colour232,bg=colour39,bold] #I:#P #[fg=colour233,bg=colour240] #(id -nu) " # Right side of status bar set -g status-right-bg colour233 set -g status-right-fg colour243 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] v7.3 " # Window status set -g window-status-format " #I:#W#F " set -g window-status-current-format " #I:#W#F " # Current window status set -g window-status-current-bg colour39 set -g window-status-current-fg colour232 # Window with activity status set -g window-status-activity-bg colour75 # fg and bg are flipped here due to set -g window-status-activity-fg colour233 # a bug in tmux # Window separator set -g window-status-separator "" # Window status alignment set -g status-justify centre # Pane border set -g pane-border-bg default set -g pane-border-fg colour238 # Active pane border set -g pane-active-border-bg default set -g pane-active-border-fg colour39 # 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-bg colour39 set -g message-fg black # Command message set -g message-command-bg colour233 set -g message-command-fg black # Mode set -g mode-bg colour39 set -g mode-fg colour232