# # Config # # Reset configuration unbind-key -a # Tmux use bash #set-option -g default-shell /bin/bash #set-option -g default-command "bash --rcfile /home/aruan/rc" # Disable mouse support in tmux # Who is using mouse anyway? set -g mouse off # Needed http://superuser.com/questions/360832/how-can-i-make-ctrlleft-right-keys-work-right-in-tmux set-window-option -g xterm-keys on # Status bar options set-option -g status-bg black set-option -g status-fg green set-option -g status-interval 1 set-option -g status-justify left set-option -g status-keys vi set-option -g status-left "[#S]" # Session name on left set-option -g status-left-length 15 set-option -g status-right "#H [%H:%M:%S %d.%m.%y]" # Date and host on right set-option -g status-right-length 40 set-option -g default-terminal "screen-256color" # Recommended by tmux set-option -g status-position top # Move status bar to the top set-option -g window-status-current-style bright # active pane name in bold # Windows options # Renumber windows when we move them set-option -g renumber-windows on # Aggressive resize set-window-option -g aggressive-resize on # Resize set-window-option -g mode-keys vi # VI mode set-option -s escape-time 0 # No wait on escape # Reload config # bind-key r source-file /etc/tmux/tmux-aruan.conf \; display-message "Config reloaded." # # Bindings # # bind-key -n --> prefix not needed # bind-key --> prefix needed bind-key : command-prompt # # Windows bindings # bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window bind-key -n C-n new-window \; rename-window "-" bind-key c new-window \; rename-window "-" bind-key -n F2 new-window \; rename-window "-" bind-key -n F3 previous-window bind-key -n F4 next-window bind-key -n C-S-F3 swap-window -t :-1 bind-key -n C-S-F4 swap-window -t :+1 bind-key -n F6 detach # Detach all other clients bind-key -n S-F6 detach-client -a bind-key -n F7 copy-mode bind-key -n M-NPage copy-mode \; send-keys NPage bind-key -n M-PPage copy-mode \; send-keys PPage bind-key -n F8 command-prompt -p "(rename-window) " "rename-window '%%'" bind-key -n C-F8 command-prompt -p "(rename-session) " "rename-session '%%'" bind-key -n F9 last-window # Select windows with alt+number bind-key -n M-0 select-window -t 0 bind-key -n M-1 select-window -t 1 bind-key -n M-2 select-window -t 2 bind-key -n M-3 select-window -t 3 bind-key -n M-4 select-window -t 4 bind-key -n M-5 select-window -t 5 bind-key -n M-6 select-window -t 6 bind-key -n M-7 select-window -t 7 bind-key -n M-8 select-window -t 8 bind-key -n M-9 select-window -t 9 # # Panes bindings # # Split panes bind-key h split-window -v bind-key v split-window -h # Move between pane with arrow bind-key -n S-left select-pane -L bind-key -n S-right select-pane -R bind-key -n S-up select-pane -U bind-key -n S-down select-pane -D # Next layout bind-key -n C-space next-layout # Synchronise panes bind-key -n M-s set-window-option synchronize-panes bind-key -n M-z resize-pane -Z # Kill pane bind-key x confirm-before -p "kill-pane #W? (y/n)" kill-pane # Resize pane bind-key -n C-S-up resize-pane -U 10 bind-key -n C-S-down resize-pane -D 10 bind-key -n C-S-left resize-pane -L 10 bind-key -n C-S-right resize-pane -R 10 # # Misc # # Blinking status on change set-option -g window-status-format " #{?window_activity_flag, #[fg=colour231]#[blink],#[fg=colour245]}#{?window_bell_flag,#[fg=colour01]#[blink],#[fg=colour245]}#I:#W " set-option -g monitor-activity on #pane border set-option -g pane-border-style 'bg=colour235' set-option -g pane-border-style 'fg=colour238' set-option -g pane-active-border-style 'bg=colour235' set-option -g pane-active-border-style 'fg=colour51'