Skip to content

Instantly share code, notes, and snippets.

@dfm
Created February 19, 2015 15:09
Show Gist options
  • Save dfm/3b6ecd332d61cc620e14 to your computer and use it in GitHub Desktop.
Save dfm/3b6ecd332d61cc620e14 to your computer and use it in GitHub Desktop.
# I'm still an ex-screen-user
set-option -g prefix C-a
unbind C-b
bind C-a send-prefix
# Relax!
set -sg escape-time 0
set -sg repeat-time 600
# Mouse
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
# 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"
# Saner splitting.
bind v split-window -h
bind s split-window -v
bind S choose-session
# Pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# 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
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5
# Left bar.
set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour238,bg=colour234,nobold] '
# Right bar.
set -g status-right '#[fg=colour39] #(echo `~/lib/dotfiles/tmux/np_spotify_mac.sh`) #[fg=colour234,bg=colour39] ✉ #(ls ~/.mail/gmail/inbox/new | wc -l | tr -d " ") ✔ #(cat ~/todo/todo.txt | wc -l | tr -d " ") #[fg=colour238,bg=colour234,nobold] #[fg=colour16,bg=colour254,bold] %d %b %R '
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39] #[fg=colour16,bg=colour39,noreverse,bold]#I:#W #[fg=colour39,bg=colour234,nobold] "
# 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
bind , command-prompt "rename-window '%%'"
# Copy mode
setw -g mode-keys vi
bind ` copy-mode
unbind [
unbind p
bind p paste-buffer
bind -t vi-copy H start-of-line
bind -t vi-copy L end-of-line
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy Escape cancel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment