Created
January 31, 2014 19:37
-
-
Save happysundar/8741394 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
# tmux config | |
# General {{{ | |
set -g prefix ` | |
unbind ^b | |
# Ring the bell if any background window rang a bell. | |
set -g bell-action any | |
# Default termtype. If the rcfile sets $TERM, that overrides this value. | |
set -g default-terminal screen-256color | |
# Status bar clock: month/day hour:minute | |
set -g status-right '%m/%d %H:%M' | |
# Watch for activity in background windows. | |
setw -g monitor-activity on | |
# ------------------------------------------------------------------------ }}} | |
# Colors {{{ | |
# NOTE: these colors were chosen assuming Solarized Light in | |
# iTerm2. They might look horrible in other setups. | |
# Status messages and command input line | |
set -g message-bg cyan | |
set -g message-fg white | |
# Set border colors for panes. This works fine for multiple panes, but has | |
# no useful effect in a 2-pane window. | |
set -g pane-border-bg default | |
set -g pane-border-fg white | |
set -g pane-active-border-bg default | |
set -g pane-active-border-fg green | |
# Status line color | |
set -g status-bg blue | |
set -g status-fg white | |
# Coloring for left-most status indicator | |
set -g status-left-bg green | |
set -g status-left-fg white | |
# For copy-mode and such I think. Look into this later. | |
#setw -g mode-bg red | |
#setw -g mode-fg brightwhite | |
# Highlight the current window in the status line | |
setw -g window-status-current-fg brightwhite | |
setw -g window-status-current-bg black | |
# Highlight windows with activity. | |
# Note, this seems to use inverse behavior, bg=fg, fg=bg... | |
# It must set inverse by default. | |
setw -g window-status-activity-fg white | |
setw -g window-status-activity-bg brightred | |
# ------------------------------------------------------------------------ }}} | |
# Mouse handling {{{ | |
# Honor mouse clicks if they are passed through by the terminal. | |
# Select windows and panes, and drag-resize panes. | |
# This is great and all but it really messes with copying via e.g. iTerm. | |
# I'm doing this with iTerm key maps using hex codes. | |
# set -g mouse-select-pane on | |
# set -g mouse-select-window on | |
# set -g mouse-resize-pane on | |
# This has to do with tmux copy buffers and the mouse. | |
# Kind of screwy, need to evaluate some other month. | |
# setw -g mode-mouse on | |
# ------------------------------------------------------------------------ }}} | |
# Key bindings {{{ | |
# Keep your finger on ctrl, or don't. | |
bind-key ^D detach-client | |
# Create splits and vertical splits | |
bind-key v split-window -h | |
bind-key ^V split-window -h | |
bind-key s split-window | |
bind-key ^S split-window | |
# Pane resize in all four directions using vi bindings. | |
# Can use these raw but I map them to ctrl-opt-<arrow> in iTerm. | |
bind-key J resize-pane -D | |
bind-key K resize-pane -U | |
bind-key H resize-pane -L | |
bind-key L resize-pane -R | |
# Use vi keybindings for tmux commandline input. | |
# Note that to get command mode you need to hit ESC twice. | |
set -g status-keys vi | |
# Use vi keybindings in copy and choice modes. | |
setw -g mode-keys vi | |
set-option -g default-command "/opt/local/bin/reattach-to-user-namespace -l bash" | |
# ------------------------------------------------------------------------ }}} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment