Skip to content

Instantly share code, notes, and snippets.

@DoZator
Last active December 11, 2015 00:28
Show Gist options
  • Save DoZator/4516543 to your computer and use it in GitHub Desktop.
Save DoZator/4516543 to your computer and use it in GitHub Desktop.
My tmux config

####After editing ~/.tmux.conf, execute this from a shell:

tmux source-file ~/.tmux.conf

Set shell

set -g default-shell $SHELL

Set 256 colors

set -g default-terminal "screen-256color"

Remap prefix to Ctrl + a

set -g prefix C-a
unbind C-b
bind C-a send-prefix

use | and - to split the windows

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

Sane scrolling

set -g mode-mouse on

Resize pane

unbind M-Up
unbind M-Down
bind C-k resize-pane -U 5
bind C-j resize-pane -D 5
bind C-h resize-pane -L 5
bind C-l resize-pane -R 5

reattach-to-user-namespace // brew install reattach-to-user-namespace

set-option -g default-command "reattach-to-user-namespace -l zsh"

Configure the status bar

set -g status-bg black
set -g status-fg white

set-option -g status-justify centre

set-option -g status-left '#[fg=green][#[bg=black,fg=cyan]#S#[fg=green]]'
set-option -g status-left-length 20

setw -g automatic-rename on
setw -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=grey,dim]#F'
setw -g window-status-current-format '#[bg=colour7,fg=black,bold]#I#[bg=colour7,fg=black]:#[fg=black]#W#[fg=dim]#F'

set -g status-right '#[fg=green][#[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]#[fg=green]]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment