Skip to content

Instantly share code, notes, and snippets.

@curtiszimmerman
Created May 31, 2016 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curtiszimmerman/631486581c1d916bc8e4b1b2e6cdae9f to your computer and use it in GitHub Desktop.
Save curtiszimmerman/631486581c1d916bc8e4b1b2e6cdae9f to your computer and use it in GitHub Desktop.
.tmux.conf
# make status bar more awesome
set -g status-utf8 on
set -g status-keys vi
set -g status-interval 1
set -g status-attr bright
set -g status-fg white
set -g status-bg black
set -g status-left-length 30
set -g status-left '#[fg=green][#[fg=red]#S - #(whoami) - #(cut -d " " -f 1-3 /proc/loadavg)#[fg=green]]#[default]'
set -g status-justify centre
set -g status-right '#[fg=green][ #[fg=blue]%H:%M:%S #[fg=green]%a #[fg=red]%d%b%Y #[fg=green]]#[default]'
setw -g window-status-current-format '#[fg=yellow] (#I.#P#F#W)#[default]'
setw -g window-status-format '#I#F#W'
# shift-arrow switches windows (without tmux command prefix)
bind -n S-Left previous-window
bind -n S-Right next-window
# alt-arrow to switch panes (without tmux command prefix)
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-pane -D
# these two settings change polling for control characters (e.g. control-c)
setw -g c0-change-trigger 10
setw -g c0-change-interval 250
# mouse is useful now (copy mode)
setw -g mouse on
# mouse scrolling enabled
bind -n WheelUpPane if "[[ #{pane_current_command} =~ vim ]]" "select-pane -t = ; send-keys -M" "select-pane -t = ; send-keys Up"
bind -n WheelDownPane if "[[ #{pane_current_command} =~ vim ]]" "select-pane -t = ; send-keys -M" "select-pane -t = ; send-keys Down"
# other mouse improvements (e.g. terminal scrolling with scrollbar)
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\e0A:kDN5=\e0B:kLFT5=\e0D:kRIT5=\e0C"
# scroll history
set -g history-limit 131072
# capture on start / restore on exit (window data when app runs)
setw -g alternate-screen on
# lower escape timing to be way more reasonable
set -s escape-time 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment