tmux config

I’ve just started playing with tmux in the i3 window manager, just to try something new.  For my benefit incase i need to reinstall, this is what I have in it so far. It’s nowhere complete, and just a start, but it works for me 🙂

Feel free to comment with additions or what you use in yours.

#change binding key
unbind-key C-b
set-option -g prefix C-a

bind-key C-a send prefix

bind-key v split-window -v
bond-key h split-window -h

set -g mouse on

bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pan -D

set -g status off



4 thoughts on “tmux config

  1. Here are mine:

    # Reload config
    bind r source-file ~/.tmux.conf

    # Rename terminals
    set -g set-titles on
    set -g set-titles-string ‘#H’

    set -g default-terminal “screen-256color”

    # Address vim mode switching delay
    set -s escape-time 0

    # Status bar customization
    set -g status-bg black
    set -g status-fg white
    set -g status-left ‘#[bg=black,fg=blue,bold][#[fg=white]#h#[fg=blue,bold]] ‘
    set -g status-left-length 30
    set -g status-right ‘#[fg=blue,bold][#[fg=white]%Y-%m-%d %H:%M#[fg=blue]]’
    set -g status-right-length 30
    set -g status-justify left

    # Window bar customization
    setw -g window-status-current-format ‘#[fg=black]#[bg=white]#I#F#W#[default]’
    setw -g window-status-activity-bg white
    setw -g window-status-activity-fg red
    setw -g window-status-separator ” | ”

    # Disable mouse
    if-shell “[[ `tmux -V | cut -d’ ‘ -f2` -lt 2.1 ]]” “setw -g mode-mouse off”
    if-shell “[[ `tmux -V | cut -d’ ‘ -f2` -ge 2.1 ]]” “setw -g mouse off”

    # Aggressive resize mode
    setw -g aggressive-resize on

    # Enable activity but disable pane message
    setw -g monitor-activity on
    set -g visual-activity off

    # Start pane numbering from 1 (for more natural switching)
    set -g base-index 1
    setw -g pane-base-index 1

    # Set 0 to go to 10 (re-numbering)
    bind 0 select-window -t :10

    # Increase scrollback history
    set -g history-limit 10000

    # Remap pane navigation to Vi mode
    unbind-key j
    unbind-key k
    unbind-key h
    unbind-key l

    bind-key j select-pane -D
    bind-key k select-pane -U
    bind-key h select-pane -L
    bind-key l select-pane -R

    # Pane resizing
    bind -r M-h resize-pane -L 5
    bind -r M-j resize-pane -D 5
    bind -r M-k resize-pane -U 5
    bind -r M-l resize-pane -R 5

    # Move windows with Prefix +
    bind -r swap-window -t +1


    That’s perhaps a bit much, but makes usage of the Tmux much better for me, although I can work just fine with default tmux config as it is pretty sane as it is.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s