# ██████████ ████ ████ ██ ██ ██ ██ # ░░░░░██░░░ ░██░██ ██░██░██ ░██░░██ ██ # ░██ ░██░░██ ██ ░██░██ ░██ ░░██ ██ # ░██ ░██ ░░███ ░██░██ ░██ ░░███ # ░██ ░██ ░░█ ░██░██ ░██ ██░██ # ░██ ░██ ░ ░██░██ ░██ ██ ░░██ # ░██ ░██ ░██░░███████ ██ ░░██ # ░░ ░░ ░░ ░░░░░░░ ░░ ░░ # # ▓▓▓▓▓▓▓▓▓▓ # ░▓ author ▓ xero # ░▓ code ▓ http://code.xero.nu/dotfiles # ░▓ mirror ▓ http://git.io/.files # ░▓▓▓▓▓▓▓▓▓▓ # ░░░░░░░░░░ # shell set -g default-command /usr/bin/zsh set -g default-shell /usr/bin/zsh # screen mode set -g default-terminal "screen-256color" # start with window 1 (instead of 0) set -g base-index 1 # renumber windows after closing set -g renumber-windows on # start with pane 1 set -g pane-base-index 1 # remove esc delay set -sg escape-time 0 # history set -g history-limit 10000 # allow terminal scrolling set-option -g terminal-overrides 'xterm*:smcup@:rmcup@' # use vi mode setw -g mode-keys vi set -g status-keys vi # pleb mode set -g mouse on # panes set -g pane-border-fg colour0 set -g pane-active-border-fg colour0 #set -g window-active-style 'bg=colour236' #set -g window-style 'bg=black' # status line set -g status-justify left set -g status-bg colour0 set -g status-fg colour14 set -g status-interval 2 # messaging set -g message-fg colour0 set -g message-bg colour14 set -g message-command-fg colour14 set -g message-command-bg colour1 # window mode setw -g mode-bg colour14 setw -g mode-fg colour0 # split sytle set -g pane-border-bg colour0 set -g pane-border-fg colour0 set -g pane-active-border-bg colour0 set -g pane-active-border-fg colour0 #resizing setw -g aggressive-resize on # window status set-option -g status-position bottom setw -g window-status-format "#[bg=colour246,fg=colour0,noreverse]█▓░ #W " setw -g window-status-current-format "#[bg=colour14,fg=colour0,noreverse]█▓░ #W " # info on right set -g status-right-length 100 set -g status-right '#(~/bin/tmux-status)' # info on left (no session display) set -g status-left '' # loud or quiet? set-option -g visual-activity on set-option -g visual-bell off set-option -g visual-silence off set-window-option -g monitor-activity off set-option -g bell-action none # tmux clock set -g clock-mode-colour colour14 # change prefix to backtick unbind C-b set-option -g prefix ` bind ` send-prefix # vim style copy paste mode unbind [ bind Escape copy-mode unbind p bind p paste-buffer bind-key -Tcopy-mode-vi 'v' send -X begin-selection bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard' # splitting unbind % bind h split-window -v unbind '"' bind v split-window -h # navigate and resize splits is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" bind -n M-h if-shell "$is_vim" "send-keys M-h" "resize-pane -L 2" bind -n M-l if-shell "$is_vim" "send-keys M-l" "resize-pane -R 2" bind -n M-k if-shell "$is_vim" "send-keys M-k" "resize-pane -U 2" bind -n M-j if-shell "$is_vim" "send-keys M-j" "resize-pane -D 2" # zoom split unbind z bind z if-shell "$is_vim" "send-keys ,z" "resize-pane -Z" bind Z resize-pane -Z # vim style commands bind : command-prompt # source config file bind r source-file ~/.tmux.conf \; display-message "█▓░ ~/.tmux.conf reloaded." # other random key-binding changes bind x kill-pane bind t set status bind a set-window-option synchronize-panes \; display-message "█▓░ synchronize"