Skip to content

Instantly share code, notes, and snippets.

@oyiptong
Last active December 29, 2015 00:39
Show Gist options
  • Save oyiptong/7587206 to your computer and use it in GitHub Desktop.
Save oyiptong/7587206 to your computer and use it in GitHub Desktop.
my tmux configuration on Mac OS X, and details on getting it to work on gnu/linux machines

Tmux config

Quick notes:

  • Each unfocused window to be displayed in blue in the lower-most part of the screen
  • The focused window is in red
  • When there is activity in a window, it will flash in white
  • The escape key is Control-z instead of Control-b. Seems to work better in minimizing hand travel
  • Hostname is displayed in green on the far right
  • Horizontal split windows: Control-|
  • Vertical split windows: Control--

Requirements

On Mac OS X, install homebrew.
Using homebrew, install tmux and reattach-to-user-namespace.
The latter is necessary for pbcopy and pbpaste to work. Read more about it here

On non-OSX machines, just remove that line from the config.

Config

            set-option -g default-command "reattach-to-user-namespace -l bash"
            unbind C-b
            bind-key a send-prefix
            set -g base-index 1
            set -sg escape-time 0
            set -g repeat-time 1000
            set -g default-terminal "screen-256color"
            set -g prefix C-z
            setw -g aggressive-resize on

            set -g status-bg blue
            set -g status-fg white
            set -g status-left ""
            set -g status-right "#[fg=green]#H"
            setw -g window-status-current-bg red
            setw -g monitor-activity on
            set -g visual-activity on

            bind | split-window -h
            bind - split-window -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment