Last active
December 14, 2015 19:58
-
-
Save unphased/5140289 to your computer and use it in GitHub Desktop.
This started out as a config that was mostly pulled from one of the first Google results for fmux.conf, and one of the first results for tmux. But now weighing in at 150 lines it is a force to be reckoned with.
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
# Report that we can handle 256 colors | |
# set -g default-terminal "xterm-256color" | |
# Rebind prefix to avoid conflicts | |
unbind C-b | |
set -g prefix C-a | |
# this is for convenience | |
bind C-d detach-client | |
bind C-a last-window | |
bind -n F10 select-pane -t :.+ # F-key bound to Caps Lock at OS/Term level | |
bind F10 select-pane -t :.+ | |
bind -n M-F10 next-window # this is frigging awesome | |
bind M-F10 next-window | |
# for recognizing shift F10 (iTerm permits customization; this is to accomodate putty) | |
set -g terminal-overrides "*:kf20=\\033[34~" | |
bind -n F20 previous-window | |
bind F20 previous-window | |
bind C-b display-panes | |
bind b display-panes # looks like i am doing this a lot (for manipulation of panes) | |
set -g display-panes-time 2000 | |
set -g display-time 2000 | |
set -s set-clipboard on | |
# friendly for ctrl key state and also allow repeat | |
bind -r n next-window | |
bind -r C-n next-window | |
bind -r p previous-window | |
bind -r C-p previous-window | |
bind -n C-S-Left swap-window -t -1 | |
bind -n C-S-Right swap-window -t +1 | |
# send prefix through with a | |
bind a send-prefix | |
bind / list-keys # a shift-key relaxation overload | |
unbind A | |
bind A command-prompt "rename-window %%" | |
unbind L | |
bind L source-file /home/slu/.tmux.conf | |
# OhMyZsh ftw! | |
# set -g default-command /bin/zsh | |
set -g default-shell /home/slu/.zsh/bin/zsh | |
# I'm a Vim user, this makes navigation easier | |
setw -g mode-keys vi | |
set -g repeat-time 250 | |
# I'm a wasd/ijkl guy, hjkl just never made any sense | |
# however since it is clearly a good vim workflow i am | |
# working it into my tmux workflow against my better judgement | |
# it also helps a great deal on the iOS keyboards so there's that. | |
unbind k | |
bind -r k select-pane -U | |
unbind j | |
bind -r j select-pane -D | |
unbind h | |
bind -r h select-pane -L | |
unbind l | |
bind -r l select-pane -R | |
bind -n M-left select-pane -L | |
bind -n M-right select-pane -R | |
bind -n M-up select-pane -U | |
bind -n M-down select-pane -D | |
bind -n M-h resize-pane -L 5 | |
bind -n M-j resize-pane -D 3 | |
bind -n M-k resize-pane -U 3 | |
bind -n M-l resize-pane -R 5 | |
# sadly the ctrl arrows definitely dont work on tmux with a mac | |
# and using mouse to resize is stupid anyway | |
unbind up | |
unbind down | |
unbind left | |
unbind right | |
bind -r up resize-pane -U 3 | |
bind -r down resize-pane -D 3 | |
bind -r left resize-pane -L 5 | |
bind -r right resize-pane -R 5 | |
# '0' is at the wrong end of the keyboard | |
set -g base-index 1 | |
# Just click it | |
set -g mouse-select-pane on | |
set -g mouse-select-window on | |
set -g mouse-resize-pane on | |
# Scroll your way into copy mode (scrollback buffer) | |
# and select text for copying with the mouse | |
setw -g mode-mouse on | |
setw -g mouse-utf8 on | |
setw -g alternate-screen on | |
# Toggle sending keystrokes to all panes in a window | |
# bind-key a set-window-option synchronize-panes | |
# Don't lose track of SSH_AGENT etc. from parent environment. | |
set -g update-environment -r | |
set -g status-keys vi | |
setw -g mode-keys vi | |
set -g status-bg '#1d1d1d' | |
set -g status-fg '#dddddd' | |
set -g status-left-length 20 | |
set -g status-left "#{?client_prefix,#[fg=green] #S ,#[fg=green]#[reverse] #S }" | |
#this client_prefix variable is only available in post 1.7 | |
set -g status-right-length 200 | |
set -g status-right '#[fg=green]#T #[fg=blue]#[reverse]%H:%M:%S %d-%b-%y#[noreverse]' | |
setw -g window-status-current-fg '#f2777a' | |
setw -g window-status-current-attr reverse | |
setw -g automatic-rename on | |
setw -g allow-rename off | |
set -g pane-active-border-bg cyan | |
set -g pane-active-border-fg black | |
set -s escape-time 50 | |
setw -g aggressive-resize on | |
setw -g xterm-keys on | |
#unbind C-Left | |
#unbind C-Right | |
#unbind C-Up | |
set -g renumber-windows on | |
#unbind C-Down | |
bind \ split-window -h | |
bind - split-window | |
setw -g monitor-activity on | |
set -g history-limit 100000 | |
# these are "overloads" on the create-pane, they create panes from existing panes/windows, to allow rearrangement | |
bind _ command-prompt -p "create pane from existing: [session]:window[.pane] " "join-pane -s '%%'" | |
bind | command-prompt -p "create vpane from existing: [session]:window[.pane] " "join-pane -h -s '%%'" | |
bind @ command-prompt -p "here is the prompt for the command" "run-shell \"tmux display-message -p 'i run in the pane currently focused which is #I;#P'; tmux break-pane -t %%; tmux display-message \\\"broke pane out into #I;#P\\\"; \" " | |
# this one is currently being worked on (is really just a test command) | |
#todo: check if list-buffers command is still set (it should be, it is a default binding) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment