Skip to content

Instantly share code, notes, and snippets.

@logikal
Created September 12, 2013 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save logikal/6541841 to your computer and use it in GitHub Desktop.
Save logikal/6541841 to your computer and use it in GitHub Desktop.
# https://github.com/justincampbell/.dotfiles/blob/master/.tmux.conf
# Nice colors
set -g default-terminal "screen-256color"
# Allow Ctrl-A binding
set -g prefix C-a
bind a send-prefix
# Reload the config
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
#set mouse mode on/off
bind M set mode-mouse on
bind m set mode-mouse off
# Copy/Paste stuff from http://robots.thoughtbot.com/post/19398560514/how-to-copy-and-paste-with-tmux-on-mac-os-x
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Start windows at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
# Autorename windows
# set -g automatic-rename on
# Scrollback
set -g history-limit 10000
# Status bar content
set -g status-interval 5
set -g status-left '#[fg=colour8]#S'
set -g status-right '#[fg=colour166]#(w -h | grep -v `whoami` | cut -f 1 -d " " | uniq | tr "\\\n" " " ) #[fg=colour8] #(whoami)@#h #[fg=default]%l:%M %Z'
set -g status-right-length 100
# Status bar styling
set -g status-bg colour235 # very dark grey
set -g status-fg colour7 # light grey
set -g window-status-current-fg colour166 # orange
# set -g status-position top # not available in tmux < 1.7
# Show activity in other windows
set -g monitor-activity on
set -g window-status-activity-attr bold
# Messages
set -g display-time 3000
set -g message-bg colour166 # orange
set -g message-fg black
# Panes
set -g pane-border-fg colour8 # dark grey
set -g pane-active-border-fg colour7 # light grey
bind z run "if [[ $(tmux list-window) =~ ZOOM ]]; then tmux last-window; tmux swap-pane -s ZOOM.1; tmux kill-window -t ZOOM; else tmux new-window -d -n ZOOM; tmux swap-pane -s ZOOM.1; tmux select-window -t ZOOM; fi"
# Clock
set -g clock-mode-style 12
set -g clock-mode-colour colour166 # orange
# Mouse
# set -g mode-mouse on
# set -g mouse-resize-pane on
# set -g mouse-select-pane on
# set -g mouse-select-window on
# VI Bindings
set -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# pbcopy fix
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# bind C-c run "tmux show-buffer | reattach-to-user-namespace pbcopy"
# bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment