# vim: ft=tmux # remap prefix from 'C-b' to 'C-x' unbind C-b set-option -g prefix C-x bind-key C-x send-prefix # make default c-x c-e work in shell (edit current line) bind-key C-e send-keys C-x C-e set-option -g default-terminal "xterm-256color" set -ga terminal-overrides ',xterm-256color:Tc' set-option -g default-shell $SHELL set-option -g renumber-windows on set-option -g base-index 1 set-option -g set-titles on set-option -g set-titles-string "#S | #W" set-option -g mouse off set-option -s escape-time 0 set-option -g history-limit 50000 set-option -g display-time 4000 set-option -g status-interval 5 set-option -g status-keys emacs set-option -g focus-events on set-option -g visual-activity off set-option -g visual-bell off set-option -g visual-silence off set-option -g bell-action none set-window-option -g automatic-rename off set-window-option -g aggressive-resize on set-window-option -g monitor-activity on set-window-option -g xterm-keys on set-window-option -g mode-keys vi bind-key 'C-x' switch-client -l bind-key 'C-\' kill-server # kill current session, and switch to another one bind-key X run-shell 'tmux switch-client -n \; kill-session -t "#S"' bind-key | split-window -h bind-key '\' split-window -v bind-key / command-prompt "run-shell '$HOME/.tmux/find_window.sh %%'" bind-key . command-prompt "run-shell '$HOME/.tmux/move_window.sh %%'" bind-key Enter resize-pane -Z bind-key u run-shell "bash $HOME/.tmux/order_windows.sh" \; display-message "windows reordered" bind-key r source-file ~/.tmux.conf \; display-message "Config reloaded." bind-key < swap-window -t -1 \; previous-window bind-key > swap-window -t +1 \; next-window # Detach all other clients bind-key -n S-F1 detach-client -a \; display-message "All other clients detached" bind-key -n S-F2 copy-mode \; display-message "copy mode" bind-key -n C-S-Left select-pane -L bind-key -n C-S-Right select-pane -R bind-key -n C-S-Up select-pane -U bind-key -n C-S-Down select-pane -D bind-key -n S-Left previous-window bind-key -n S-Right next-window bind-key -n Home send Escape "OH" bind-key -n End send Escape "OF" bind-key -n S-F11 set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}" bind-key -n S-F12 set-window-option mouse\; display-message "mouse is now #{?mouse,on,off}" ### # Theme ### set -g status-position top set -g status-bg colour234 set -g status-justify left set -g status-interval 0 set -g status-left '  #S ' if-shell -b '[ -z "$SSH_TTY" ]' { set -g status-left-style bg=colour13,bold,fg=colour234 } if-shell -b '[ -n "$SSH_TTY" ]' { set -g status-left-style bg=colour6,bold,fg=colour234 } set -g status-left-attr bold set -g status-left-fg colour234 set -g status-left-length 50 set -g status-right '' set -g status-right-length 0 set -g pane-border-bg colour234 set -g pane-border-fg colour153 set -g pane-active-border-bg colour234 set -g pane-active-border-fg colour153 set -g window-style fg=colour15,bg=colour235 set -g window-active-style fg=colour15,bg=colour234 setw -g window-status-current-fg colour81 setw -g window-status-current-bg colour238 setw -g window-status-current-attr bold setw -g window-status-current-format ' #I #[fg=colour250]#[fg=colour255]#W#[fg=colour50] #F ' setw -g window-status-format ' #I #[fg=colour237]#[fg=colour250]#W#[fg=colour244] #F ' setw -g window-status-fg colour138 setw -g window-status-bg colour234 set -g message-fg colour232 set -g message-bg colour166 setw -g clock-mode-colour colour135 setw -g mode-attr bold setw -g mode-fg colour11 setw -g mode-bg colour234