Skip to content

Instantly share code, notes, and snippets.

@bionix
Forked from eseceve/.tmux.conf
Last active August 29, 2015 14:13
Show Gist options
  • Save bionix/38a71f7a2200a557de39 to your computer and use it in GitHub Desktop.
Save bionix/38a71f7a2200a557de39 to your computer and use it in GitHub Desktop.
### INSTALLATION NOTES ###
# 1. Install Homebrew (https://github.com/mxcl/homebrew)
# 2. brew install zsh
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh)
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
# 5. Install iTerm2 (https://code.google.com/p/iterm2/downloads/list)
# 6. In iTerm2 preferences for your profile set:
# Character Encoding: Unicode (UTF-8)
# Report Terminal Type: xterm-256color
# 7. Get scripts for status-right
# itunesartist && itunestrack (https://gist.github.com/v-yarotsky/2157908)
# battery (https://gist.github.com/napcs/1147532/)
# 8. Put all scripts in your home folder (~)
# 9. Execution permission for all scripts (chmod +x [file])
#
# Usage:
# - Prefix is set to Ctrl-a (make sure you remapped Caps Lock to Ctrl)
# - All prefixed with Ctrl-a
# - Last used window: /
# - Last used pane: ;
# - Vertical split: v
# - Horizontal split: s
# - Previous window: [
# - Next window: ]
# - Choose session: Ctrl-s
# - Quick window: Ctrl-q
set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g default-terminal "xterm-256color"
# status bar right contents
set -g status-right-length 100
set -g status-right "#[fg=default]#(~/itunesartist) - #(~/itunestrack) #[fg=white]| #[fg=default]#(~/battery Discharging) #[fg=white]| #[fg=default]%d %b %R"
set -g status-left-length 100
set -g status-left ""
# UTF-8
set-option -g status-utf8 on
set-window-option -g utf8 on
set-option -g status-keys vi
set-option -g mode-keys vi
#no command delay
set -sg escape-time 0
# Bind Mouse
set-option -g mouse-select-pane on
set-option -g mouse-resize-pane on
set-option -g mouse-select-window on
set-option -g mode-mouse on
### KEYS ###
# using Ctrl-a as prefix
unbind C-b
set-option -g prefix C-a
bind C-a send-prefix
unbind /
bind / last-window
# split window
unbind %
unbind '"'
bind s split-window -v
bind v split-window -h
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
unbind {
bind { swap-pane -D
unbind }
bind } swap-pane -U
bind Escape copy-mode
bind p paste-buffer
unbind [
bind [ previous-window
unbind ]
bind ] next-window
unbind o
bind o select-pane -t :.-
bind C-q command-prompt -I "htop" -p "Quick window command: " "new-window '%%'"
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind C-c run "tmux save-buffer - | pbcopy"
bind C-v run "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
bind C-s choose-session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment