Skip to content

Instantly share code, notes, and snippets.

@masterl
Last active December 7, 2015 18:44
Show Gist options
  • Save masterl/5d560b7c2a83fddb84fe to your computer and use it in GitHub Desktop.
Save masterl/5d560b7c2a83fddb84fe to your computer and use it in GitHub Desktop.
Conf file for tmux
# Shortcut for reloading config
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
# Terminal name
set -g set-titles on
set -g set-titles-string "#(whoami)::#h::#(curl ipecho.net/plain;echo)"
# Status bar customization
set -g status-utf8 on
set -g status-bg black
set -g status-fg white
set -g status-interval 5
set -g status-left-length 90
set -g status-right-length 60
set -g status-left "#[fg=Green]#(whoami)#[fg=white]::#[fg=blue]#(hostname -s)#[fg=white]::##[fg=yellow]#(curl ipecho.net/plain;echo)"
set -g status-justify left
set -g status-right '#[fg=Cyan]Session: #S #[fg=white]%a %d %b %Y %R'
# Remap window navigation to vim
unbind-key j
bind-key j select-pane -D
unbind-key k
bind-key k select-pane -U
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R
#rebinds prefix key
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# split window and fix path for tmux 1.9
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# enable mouse support for switching panes/windows
# NOTE: This breaks selecting/copying text on OSX
# To select text as expected, hold Option to disable it (iTerm2)
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Resize pane shortcuts
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment