# ██████████ ████ ████ ██ ██ ██ ██ # ░░░░░██░░░ ░██░██ ██░██░██ ░██░░██ ██ # ░██ ░██░░██ ██ ░██░██ ░██ ░░██ ██ # ░██ ░██ ░░███ ░██░██ ░██ ░░███ # ░██ ░██ ░░█ ░██░██ ░██ ██░██ # ░██ ░██ ░ ░██░██ ░██ ██ ░░██ # ░██ ░██ ░██░░███████ ██ ░░██ # ░░ ░░ ░░ ░░░░░░░ ░░ ░░ # # ▓▓▓▓▓▓▓▓▓▓ # ░▓ author ▓ xero # ░▓ code ▓ http://code.xero.nu/dotfiles # ░▓ mirror ▓ http://git.io/.files # ░▓▓▓▓▓▓▓▓▓▓ # ░░░░░░░░░░ # change prefix to backtick unbind C-b set-option -g prefix ` bind ` send-prefix # shell set -g default-command /usr/bin/zsh set -g default-shell /usr/bin/zsh # 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 # screen mode set -g default-terminal "screen-256color" # remove esc delay set -sg escape-time 0 # source config file bind r source-file ~/.tmux.conf \; display-message "█▓░ ~/.tmux.conf reloaded." # history set -g history-limit 4096 # allow terminal scrolling set-option -g terminal-overrides 'xterm*:smcup@:rmcup@' # 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' # use vi mode setw -g mode-keys vi set -g status-keys vi # pleb mode set -g mouse on # splitting unbind % bind h split-window -v unbind '"' bind v split-window -h 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 S-j resize-pane -D 2 bind -n S-k resize-pane -U 2 bind -n S-h resize-pane -L 2 bind -n S-l resize-pane -R 2 # colon : bind : command-prompt # 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 # some key-binding changes bind x kill-pane bind X next-layout bind Z previous-layout bind t set status bind a set-window-option synchronize-panes \; display-message "█▓░ synchronize"