Skip to content

Instantly share code, notes, and snippets.

@josephj
Created October 22, 2011 08:20

Revisions

  1. @invalid-email-address Anonymous created this gist Oct 22, 2011.
    45 changes: 45 additions & 0 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    # Make tmux like screen, using Ctrl+A
    unbind C-b
    set -g prefix ^A
    bind a send-prefix

    # General configuration.
    # $ tmux show-options -g
    set -g base-index 1
    set -g display-time 5000
    set -g repeat-time 1000
    set -g status-keys vi
    set -g status-utf8 on
    set -g status-bg black
    set -g status-fg white
    set -g status-justify left
    set -g status-interval 1
    set -g status-left-length 15
    set -g status-right-length 55
    set -g status-left "#[fg=white,bright,bg=blue] Session #[fg=yellow,bright,bg=blue]#S #[default] |" # session-name
    set -g status-right "#[fg=red,bright][ #[fg=cyan]#(git branch --no-color | sed -e '/^[^*]/d' -e 's/* //') #[fg=red]]#[default] #[fg=yellow,bright] %Y-%m-%d #[fg=green]%H:%M:%S #[default]#[fg=magenta,bright]#[default]"
    set -g terminal-overrides 'xterm*:smcup@:rmcup@'

    # Configuration for each window.
    # $ tmux show-window-options -g
    setw -g mode-keys vi
    setw -g utf8 on
    setw -g window-status-format " #I$ #W "
    setw -g window-status-current-format " #I$ #W "
    setw -g window-status-current-bg yellow
    setw -g window-status-current-fg blue
    setw -g window-status-current-attr default

    # Use h and v for splitting.
    unbind %
    unbind '"'
    bind v split-window -h
    bind | split-window -h
    bind h split-window -v
    bind - split-window -v

    # Use a for renaming the window prompt.
    unbind ','
    bind a command-prompt -I '#W' "rename-window '%%'"

    bind-key w display-panes