Skip to content

Instantly share code, notes, and snippets.

@aar0nTw
Created April 1, 2014 10:58
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 aar0nTw/9911844 to your computer and use it in GitHub Desktop.
Save aar0nTw/9911844 to your computer and use it in GitHub Desktop.
# use pbcopy and pbpaste
# need preinstall the reattach-to-user-namespace 'brew install reattach-to-user-namespace'
#
set -g default-shell /bin/zsh
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"
# start window index of 1
set -g base-index 1
# UTF-8
set-option -g status-utf8 on
set-window-option -g pane-base-index 1
#supposedly fixes pausing in vim
set -sg escape-time 1
set-option -g mouse-select-pane on
#set-window-option -g mode-mouse on
set-window-option -g automatic-rename off # auto name
# act like vim
setw -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
unbind p
bind p paste-buffer
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# # act like GNU screen
unbind C-b
set -g prefix C-a
# Allow C-A a to send C-A to application
bind C-a send-prefix
# Reload key
bind r source-file ~/.tmux.conf
# # look good
set -g default-terminal "xterm-256color"
set -g history-limit 5000
# statusbar --------------------------------------------------------------
#
#Refresh the status bar in seconds.
set status-interval 30
# # The status bar itself.
set-window-option -g monitor-activity on
set-option -g status-left-length 30
set-option -g status-left "#[fg=black]#[bg=magenta]⮀#[bg=magenta]#[fg=white,bold] ❐ #S #[default]#[bg=black]#[fg=magenta]⮀"
set-option -g status-right-length 45
set-option -g status-right "%H:%M #[fg=cyan]#[bg=black]⮂#[fg=white]#[bg=cyan]#(sh /usr/local/bin/power.sh) "
#set-option -g status-left "#(~/.tmux/tmux-powerline/powerline.sh left)"
#set-option -g status-right "#(~/.tmux/tmux-powerline/powerline.sh right")
# # default statusbar colors
set-option -g status-fg white
set-option -g status-bg black
set-option -g status-attr default
# # default window title colors
set-window-option -g window-status-fg colour69
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
# # active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg red
set-window-option -g window-status-current-attr bright
set -g window-status-current-format "#[fg=black,bg=colour44]⮀#[fg=black,bg=colour44,noreverse,bold] #I ⮁ #W #[fg=colour44,bg=black,nobold]⮀"
# # command/message line colors
set-option -g message-fg white
set-option -g message-bg black
set-option -g message-attr bright
# # Rebinding the pane splitting bindings
# unbind % # Remove default bindings since we're replacing
bind | split-window -h
bind - split-window -v
# # Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# clock
set-window-option -g clock-mode-colour cyan
set-window-option -g clock-mode-style 12
# Panes
unbind Up
bind Up neww -d -n tmp \; swap-pane -s tmp.0 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.0 \; kill-window -t tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment