Skip to content

Instantly share code, notes, and snippets.

@kyleterry
Created March 5, 2015 21:57
Show Gist options
  • Save kyleterry/0c8a15cf81aff6894149 to your computer and use it in GitHub Desktop.
Save kyleterry/0c8a15cf81aff6894149 to your computer and use it in GitHub Desktop.
#Set escape char to Ctrl-J
set-option -g prefix C-o
unbind-key C-b
bind-key C-o send-prefix
# Enable utf8, thank god.
setw -g utf8 on
set -g status-utf8 on
# easy window splitting
unbind %
bind-key | split-window -h
bind-key = split-window
# Bar on top, please.
set-option -g status-position bottom
# Sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Update the statusbar every second. (might dup auto-rename?)
set -g status-interval 1
# Renumber windows on closing
set -g renumber-windows on
# Make the right side larger for longer hostnames
set -g status-right-length 60
set -g status-right "#(hostname -s) %H:%M"
#set -g set-titles-string '#S.#I.#P #W #T' # session.windowindex.paneindex windowname windowtitle
#set -g status-left '#[fg=white]#[bg=black] #S.#I.#P #[default]'
set -g status-left-length 60
# No mouse mode
set-window-option -g mode-mouse off
setw -g mode-mouse off
set -g mouse-select-pane off
# Automatically set window title
setw -g automatic-rename on
# Set scroll history limit
set -g history-limit 30000
set -g set-titles on
set -g set-titles-string "tmux:#I #W #T"
# Reload tmux config
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Split and show htop
bind '~' split-window "exec htop"
# Search buffer for URLS and open them in split. (AMAZING.)
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; split-window -l 10 "urlview /tmp/tmux-buffer"
# Save whole buffer to file for search
bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
# Vi keys in copy mode
setw -g mode-keys vi
bind [ copy-mode
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy V rectangle-toggle
bind ] paste-buffer
bind Y run "tmux save-buffer - | pbcopy"
# Resize panes with obvious keys.
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
# Select panes with vi-style movement commands.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Disable arrow keys to move around, HARD MODE!
unbind Left
unbind Down
unbind Up
unbind Right
# buffer
#bind Space choose-buffer
# visual notification of activity in other windows, but dont show visual warn
setw -g monitor-activity on
set -g visual-activity off
# colorize panes
set-option -g pane-border-fg colour235
set-option -g pane-active-border-fg colour240
# colorize messages in the command line
set-option -g message-fg colour255
set-option -g message-bg default
# set color for status bar
set-option -g status-fg colour236
set-option -g status-bg default
#set-option -g status-attr dim
# set window list colors - white for active and 240 for inactive, 57 for activity
set-window-option -g window-status-fg colour240
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
set-window-option -g window-status-activity-fg colour5
set-window-option -g window-status-activity-bg default
#set-window-option -g window-status-activity-attr bold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment