Skip to content

Instantly share code, notes, and snippets.

@gbluma
Created April 9, 2015 23:48
Show Gist options
  • Save gbluma/3e7019299c0e14a7e438 to your computer and use it in GitHub Desktop.
Save gbluma/3e7019299c0e14a7e438 to your computer and use it in GitHub Desktop.
# Use something easier to type as the prefix.
set -g prefix C-f
unbind C-b
bind C-f send-prefix
# Relax!
set -sg escape-time 0
set -sg repeat-time 600
# This is hilariously absurd. How many nerds use tmux on OS X every day and
# it's still fundamentally broken?
#set -g default-command "reattach-to-user-namespace -l zsh"
# Less stretching to get to the first item.
set -g base-index 1
setw -g pane-base-index 1
# Reload the config.
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
unbind t
bind t run-shell 'wemux display_users'
# Saner splitting.
bind v split-window -h
bind s split-window -v
bind S choose-session \; run-shell 'sleep 5s; wemux summon'
# Pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resizing
bind -r Left resize-pane -L 2
bind -r Down resize-pane -D 2
bind -r Up resize-pane -U 2
bind -r Right resize-pane -R 2
# Window movement
bind -r , select-window -t :-
bind -r . select-window -t :+
# 256 colors please
set -g default-terminal "screen-256color"
# Bad Wolf
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
# Custom status bar
# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5
# Inconsolata-dz-Powerline Theme:
#[fg=white,bg=colour39,noreverse,bold]
#green hostname: fg=colour22,bg=colour148
#set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
#set -g status-right '#[fg=colour238,bg=colour234,nobold]⮂#[fg=colour245,bg=colour238] #h #[fg=colour252]⮂#[fg=colour235,bg=colour252,bold] #(wemux status_users) '
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=colour25,bg=colour39,noreverse,bold] #I #W #[fg=colour39,bg=colour234,nobold]"
bind t run-shell 'wemux display_users'
# Alternate Theme for shells without Inconsolata-dz-Powerline:
#set -g status-left ' #[bold] #S#[default] '
#set -g status-right '#[bold]#(whoami) #H#[default] `#[fg=blue]%H:%M#[default] '
# Activity
setw -g monitor-activity on
set -g visual-activity off
# Autorename sanely.
setw -g automatic-rename on
# Better name management
bind c new-window \; command-prompt "rename-window '%%'"
bind C new-window
bind , command-prompt "rename-window '%%'"
# Copy mode
setw -g mode-keys vi
bind [ copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
setw -g utf8 on
set -g status-utf8 on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment