Created
August 6, 2012 19:05
-
-
Save cicloid/3277595 to your computer and use it in GitHub Desktop.
My TMUX Conf
This file contains 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
# Setting the prefix from C-b to C-a | |
set -g prefix C-a | |
# Free the original Ctrl-b prefix keybinding | |
unbind C-b | |
#setting the delay between prefix and command | |
set -sg escape-time 1 | |
# Ensure that we can send Ctrl-A to other apps | |
bind C-a send-prefix | |
# Set the base index for windows to 1 instead of 0 | |
set -g base-index 1 | |
# Set the base index for panes to 1 instead of 0 | |
setw -g pane-base-index 1 | |
# Reload the file with Prefix r | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# Quick pane selection | |
bind -r C-h select-window -t :- | |
bind -r C-l select-window -t :+ | |
# resize panes with repetition | |
bind -r H resize-pane -L 5 | |
bind -r J resize-pane -D 5 | |
bind -r K resize-pane -U 5 | |
bind -r L resize-pane -R 5 | |
# handle mouse, still thinking if I should remove this | |
setw -g mode-mouse on | |
#set -g mouse-select-pane on | |
#set -g mouse-resize-pane on | |
#set -g mouse-select-window on | |
# Change split commands | |
bind \ split-window -h | |
bind - split-window -v | |
# Set window notifications | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# set the status line's colors | |
set -g status-fg white | |
set -g status-bg black | |
# set the color of the window list | |
setw -g window-status-fg cyan | |
setw -g window-status-bg default | |
setw -g window-status-attr dim | |
# set colors for the active window | |
setw -g window-status-current-fg white | |
setw -g window-status-current-bg red | |
setw -g window-status-current-attr bright | |
# pane colors | |
set -g pane-border-fg colour235 #base02 | |
set -g pane-border-bg black | |
set -g pane-active-border-fg yellow | |
set -g pane-active-border-bg black | |
# Command / message line | |
set -g message-fg white | |
set -g message-bg black | |
set -g message-attr bright | |
# Highlight active window | |
set-window-option -g window-status-current-bg red | |
# Automatically set window title | |
setw -g automatic-rename | |
# Set status bar | |
set -g status-utf8 on | |
set -g status-interval 60 | |
set -g status-left-length 40 | |
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P" | |
set -g status-right "#(./bin/nbattery) | #[fg=cyan]%d %b %R // #h" | |
set -g status-justify centre | |
# `brew install reattach-to-user-namespace` useful for clipboard compatibility on OSX | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
set -g default-shell /bin/zsh | |
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" | |
# look good, really good | |
set -g default-terminal "screen-256color" | |
# change keys to vim inspired | |
setw -g mode-keys vi | |
#open in same dir | |
#unbind v | |
#unbind h | |
#bind v send-keys " ~/bin/tmux-panes -h" C-m | |
#bind h send-keys " ~/bin/tmux-panes -v" C-m | |
# split and maximize | |
unbind Up | |
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp | |
# and back again | |
unbind Down | |
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp | |
bind-key C-a last-window |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment