Created
March 26, 2015 18:27
-
-
Save mambocab/060365c78670c8d0b8bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://github.com/SegFaultAX/tmux-dotfiles/blob/master/tmux.conf | |
bind -n S-Left previous-window | |
bind -n S-Right next-window | |
# with thanks to thoughtbot | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
bind-key -r [ select-window -t :- | |
bind-key -r ] select-window -t :+ | |
set-option -g default-command "zsh" | |
# with thanks to @sloria | |
# set prefix key to space | |
unbind C-space | |
set -g prefix C-space | |
# renumber windows upon closing | |
set -g renumber-windows on | |
# reload tmux config | |
unbind r | |
bind r \ | |
source-file ~/.tmux.conf \;\ | |
display 'Reloaded tmux config.' | |
# create windows and panes in current directory | |
unbind '"' | |
bind '"' split-window -c "#{pane_current_path}" | |
unbind % | |
bind % split-window -h -c "#{pane_current_path}" | |
# Use t for creating new panes, like tabs in OSX | |
unbind t | |
bind t split-window -h -c "#{pane_current_path}" | |
unbind C-t | |
bind C-t split-window -c "#{pane_current_path}" | |
unbind c | |
bind c new-window -c "#{pane_current_path}" | |
bind C-c new-window -c "#{pane_current_path}" | |
# Layouts | |
######### | |
# Tile all | |
bind = select-layout tiled | |
bind + select-layout main-horizontal | |
# Mouse mode | |
############ | |
# Toggle mouse on | |
bind m \ | |
set -g mode-mouse on \;\ | |
set -g mouse-resize-pane on \;\ | |
set -g mouse-select-pane on \;\ | |
set -g mouse-select-window on \;\ | |
display 'Mouse: ON' | |
# Toggle mouse off | |
bind M \ | |
set -g mode-mouse off \;\ | |
set -g mouse-resize-pane off \;\ | |
set -g mouse-select-pane off \;\ | |
set -g mouse-select-window off \;\ | |
display 'Mouse: OFF' | |
# Navigate panes | |
################ | |
# Make cycling through panes really easy (hold ctrl and press space twice) | |
bind C-space select-pane -t :.+ | |
# Closing panes, windows and sessions | |
##################################### | |
# Using w for closing, like in OSX | |
# close panes | |
unbind w | |
bind w kill-pane | |
# close window | |
unbind C-w | |
bind C-w kill-window | |
# close sessions with q | |
unbind q | |
bind q confirm kill-session | |
# close server with ctrl-q | |
unbind C-q | |
bind C-q confirm kill-server | |
# Choose windows and sessions with tab | |
###################################### | |
bind tab choose-window | |
# Make copy-n-paste work on OSX | |
############################### | |
# Setup 'v' to begin selection as in Vim | |
bind-key -t vi-copy v begin-selection | |
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
######################### | |
# With thanks to @eevee | |
bind-key Space next-window | |
# Options | |
set-option -sg escape-time 50 # this makes vim fucking awful to use | |
set-option -g base-index 1 | |
set-window-option -g pane-base-index 1 | |
set-option -g default-terminal screen-256color | |
set-option -g default-terminal xterm | |
set-option -g lock-command vlock | |
set-window-option -g xterm-keys on # to make ctrl-arrow, etc. work | |
set-option -g set-titles on | |
set-option -g set-titles-string '[#S:#I #H] #W' # use screen title | |
# COLORS. | |
# For reference, the xterm color cube points are: 00, 5F, 87, AF, D7, FF | |
# Trim window titles to a reasonable length | |
set-window-option -g window-status-format '#[fg=cyan]#F#I#[default] #32W ' | |
set-window-option -g window-status-current-format '#[fg=cyan] #I#[default] #32W ' | |
# Status bar | |
# set-option -g status-bg colour238 | |
# set-option -g status-fg colour0 | |
# # Left shows the session name | |
# set-option -g status-left-bg default | |
# set-option -g status-left-fg colour13 | |
# # Right is some CPU stats | |
# set-option -g status-right-bg default | |
# set-option -g status-right-fg colour11 | |
# # Window | |
# set-window-option -g window-status-fg cyan | |
# set-window-option -g window-status-current-fg colour15 | |
# set-window-option -g window-status-current-bg colour238 | |
# # Beeped windows get a blinding orange background | |
# set-window-option -g window-status-bell-fg '#000000' | |
# set-window-option -g window-status-bell-bg '#d78700' | |
# set-window-option -g window-status-bell-attr none | |
source /Users/jwshephe/src/powerline/powerline/bindings/tmux/powerline.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment