Created
March 26, 2013 05:59
-
-
Save thejonanshow/5243450 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
| ##### Basic Usage ##### | |
| # First things first: Remap the prefix key to reduce conflicts with Emacs! | |
| unbind C-b | |
| # By default, we'll use Control-backslash as the prefix key. | |
| set -g prefix 'C-\' ; bind 'C-\' send-prefix | |
| # However, some people complain about this, so we'll also add a few | |
| # bindings that let you quickly select the binding you want. | |
| # You can add your own to ~/.tmux.conf.local (see bottom of file). | |
| # | |
| # These lines take the form: | |
| # bind A set -g prefix 'C-a' \; bind 'C-a' send-prefix | |
| # \_________________/ \____________________/ | |
| # The first command sets C-a as the prefix. | |
| # The second command allows the prefix keystroke to be sent to the | |
| # active pane (in case the binding overrides something that was useful). | |
| bind A set -g prefix 'C-a' \; bind 'C-a' send-prefix | |
| bind T set -g prefix 'C-t' \; bind 'C-t' send-prefix | |
| bind \ set -g prefix 'C-\' \; bind 'C-\' send-prefix | |
| # Reload tmux config so we can pick up changes to this file without needing to restart tmux | |
| bind r source-file ~/.tmux.conf \; display "Reloaded tmux configuration!" | |
| # Index windows from 1, not 0, so they line up a little better | |
| # with the order of the number keys on the keyboard | |
| set -g base-index 1 | |
| setw -g pane-base-index 1 | |
| # Reduce the command delay time to something a bit shorter | |
| set -sg escape-time 1 | |
| # Extend the repeat interval for repeatable commands (e.g., resize-pane) | |
| set -sg repeat-time 1000 | |
| ##### Environment variables ##### | |
| # Copy environment variables into new shells (see docs for the basic set | |
| # of variables, but included is SSH_AGENT_PID, which will help keep | |
| # shells created inside tmux from asking you for your SSH key's | |
| # passphrase ALL. THE. TIME. | |
| set -g update-environment -r | |
| ##### Mouse Support (or lack thereof) ##### | |
| # No mouse for you! | |
| # (Note: turning on mouse support seems to make it impossible to use the | |
| # mouse to copy text into the system clipboard. Surely there's a way | |
| # around this if I ever feel like shaving that yak. -JW) | |
| setw -g mode-mouse off | |
| ##### Scrollback Navigation ##### | |
| # Use vi-style navigation in Copy mode (which is also scrollback mode) | |
| setw -g mode-keys vi | |
| ##### Window/Pane Management ##### | |
| # Split windows more intuitively (except for the fact that tmux doesn't | |
| # understand that a horizontal split means the pane should be split down the | |
| # middle horizontally, and likewise for a vertical split). | |
| bind | split-window -h # horizontal columns | |
| bind - split-window -v # vertical rows | |
| # Navigate panes vim-style! | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| # And windows too! | |
| bind -r C-l select-window -t :+ | |
| bind -r C-h select-window -t :- | |
| # Quickly jump between two windows | |
| bind i last-window | |
| # Resizing panes | |
| 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 | |
| # Renumber windows | |
| bind m command-prompt -p "move window to:" "move-window -t '%%'" | |
| ##### Colors ##### | |
| # Ensure we're using 256 colors | |
| set -g default-terminal "screen-256color" | |
| # Status bar | |
| set -g status-fg white | |
| set -g status-bg "#333333" | |
| # Window list | |
| setw -g window-status-fg green | |
| setw -g window-status-bg default | |
| setw -g window-status-attr dim | |
| setw -g window-status-current-fg green | |
| setw -g window-status-current-bg white | |
| setw -g window-status-current-attr bright | |
| # Pane borders | |
| set -g pane-border-fg green | |
| set -g pane-border-bg black | |
| set -g pane-active-border-fg green | |
| set -g pane-active-border-bg yellow | |
| # Command line | |
| set -g message-fg white | |
| set -g message-bg black | |
| set -g message-attr bright | |
| # Status Bar Items | |
| set -g status-utf8 on | |
| set -g status-left-length 40 | |
| set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=green]#P" | |
| set -g status-right "#[fg=yellow]%d %b %R #[fg=green]#(wemux status_users)" | |
| set -g status-justify centre | |
| set -g status-interval 15 | |
| # Monitor windows for activity | |
| setw -g monitor-activity on | |
| set -g visual-activity on | |
| ##### Local Settings ##### | |
| source-file ~/.tmux.conf.local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment