Skip to content

Instantly share code, notes, and snippets.

@defHLT
Created October 17, 2013 15:33
Show Gist options
  • Save defHLT/7027079 to your computer and use it in GitHub Desktop.
Save defHLT/7027079 to your computer and use it in GitHub Desktop.
# Sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-window-option -g xterm-keys on
# Titles
set -g set-titles on
# Set window title string
# #H Hostname of local host
# #I Current window index
# #P Current pane index
# #S Session name
# #T Current window title
# #W Current window name
# # A literal ‘#’
set -g set-titles-string '#H / #S / #W'
# Automatically set window title
setw -g automatic-rename
# Prefix
unbind C-b
set -g prefix C-j
bind C-u copy-mode -u
bind r source ~/.tmux.conf
#bind C-j send-prefix
bind C-j last-window
bind ` last-pane
# $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $
#
# vim-keys.conf, v1.2 2010/09/12
#
# By Daniel Thau. Public domain.
#
# This configuration file binds many vi- and vim-like bindings to the
# appropriate tmux key bindings. Note that for many key bindings there is no
# tmux analogue. This is intended for tmux 1.3, which handles pane selection
# differently from the previous versions
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
bind S split-window -vp 25
bind V split-window -hp 25
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
# bind : to command-prompt like vim
# this is the default in tmux already
bind \; command-prompt
# vi-style controls for copy mode
setw -g mode-keys vi
# Windows switching
bind -n S-Right next-window
bind -n S-Left previous-window
bind -n F1 next-window
#bind-key C-j last-pane
bind-key C-o last-window
# We are programmers, however:
set -g base-index 1
# Don't downsize to the smallest terminal window
setw -g aggressive-resize on
# status bar
set -g status-right "#[fg=brightblack]#(uptime | sed 's/.*load average: //') | #(date '+%a %H:%M%z')"
#### COLOUR
# default statusbar colors
set-option -g status-bg white
set-option -g status-fg brightblack
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg brightblack
set-window-option -g window-status-bg white
#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 brightblack
#set-window-option -g window-status-current-attr bright
set-window-option -g window-status-bell-fg magenta
set-window-option -g window-status-bell-bg white
# pane border
set-option -g pane-border-fg default
set-option -g pane-active-border-fg green
# message text
set-option -g message-bg black #base02
set-option -g message-fg brightred #orange
# pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange
# clock
set-window-option -g clock-mode-colour green #green
setw -g mode-mouse off
setw -g mouse-select-window off
set -g mouse-select-pane off
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# Scroll History
set -g history-limit 32000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g terminal-overrides 'rxvt-unicode*:smcup@:rmcup@'
setw -g automatic-rename on
#set -g status-bg black
#set -g status-fg yellow
#setw -g window-status-current-attr bright
#setw -g window-status-current-bg red
#setw -g window-status-current-fg white
#-- colorscheme --#
#-- see also: https://github.com/seebi/tmux-colors-solarized --#
## default statusbar colors
#set -g status-bg colour235 #base02
#set -g status-fg colour136 #yellow
#set -g status-attr default
## default window title colors
#setw -g window-status-fg colour244
#setw -g window-status-bg default
##setw -g window-status-attr dim
## active window title colors
#setw -g window-status-current-fg colour166 #orange
#setw -g window-status-current-bg default
##setw -g window-status-current-attr bright
## pane border
#set -g pane-border-fg colour235 #base02
#set -g pane-active-border-fg colour240 #base01
## message text
#set -g message-bg colour235 #base02
#set -g message-fg colour166 #orange
## pane number display
#set -g display-panes-active-colour colour33 #blue
#set -g display-panes-colour colour166 #orange
# clock
set -g status-justify left
#set -g default-terminal "screen-256color"
# vi-style controls in copy mode
set-option -g status-keys vi
set-window-option -g mode-keys vi
# v and y like vi in copy-mode
#bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
#bind-key -t vi-copy 'u' send-key C-u
#bind-key -t vi-copy d send-key C-d
set -ga terminal-overrides ",rxvt*:XT"
set -ga terminal-overrides ",xterm*:XT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment