├── CITATION.cff ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── README.md └── sources ├── base-index-pane-number-is-1.conf ├── mouse.conf ├── platform-specific ├── darwin │ └── tmux.conf └── linux │ └── tmux.conf ├── platform.conf ├── prefix-is-control-a.conf ├── select-layout-via-brackets.conf ├── select-pane-via-hjkl.conf ├── select-window-via-meta-number.conf ├── shell.conf ├── split-window.conf ├── status-via-powerline.conf ├── status.conf ├── switch-session-via-name.conf ├── unbind-all-keys.conf ├── version-specific ├── 1.9 │ ├── mouse.conf │ └── utf8.conf ├── 2.0 │ ├── mouse.conf │ └── utf8.conf ├── 2.1 │ ├── mouse.conf │ └── utf8.conf ├── 2.2 │ └── tmux.conf ├── 2.3 │ └── tmux.conf ├── 3.0 │ ├── mouse.conf │ └── status-color-is-black-on-white.conf ├── 3.1 │ ├── mouse.conf │ └── status-color-is-black-on-white.conf ├── 3.2 │ ├── mouse.conf │ └── status-style-is-black-on-white.conf └── 3.3 │ ├── mouse.conf │ └── status-style-is-black-on-white.conf ├── version.conf └── zoom-via-plus-minus.conf /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | title: tmux-conf 3 | message: >- 4 | If you use this work and you want to cite it, 5 | then you can use the metadata from this file. 6 | type: software 7 | authors: 8 | - given-names: Joel Parker 9 | family-names: Henderson 10 | email: joel@joelparkerhenderson.com 11 | affiliation: joelparkerhenderson.com 12 | orcid: 'https://orcid.org/0009-0000-4681-282X' 13 | identifiers: 14 | - type: url 15 | value: 'https://github.com/SixArm/tmux-conf/' 16 | description: tmux-conf 17 | repository-code: 'https://github.com/SixArm/tmux-conf/' 18 | abstract: >- 19 | tmux-conf 20 | license: See license file 21 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * codeowners@sixarm.com 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 2 | # Contributor Covenant Code of Conduct 3 | 4 | ## Our Pledge 5 | 6 | We as members, contributors, and leaders pledge to make participation in our 7 | community a harassment-free experience for everyone, regardless of age, body 8 | size, visible or invisible disability, ethnicity, sex characteristics, gender 9 | identity and expression, level of experience, education, socio-economic status, 10 | nationality, personal appearance, race, caste, color, religion, or sexual 11 | identity and orientation. 12 | 13 | We pledge to act and interact in ways that contribute to an open, welcoming, 14 | diverse, inclusive, and healthy community. 15 | 16 | ## Our Standards 17 | 18 | Examples of behavior that contributes to a positive environment for our 19 | community include: 20 | 21 | * Demonstrating empathy and kindness toward other people 22 | * Being respectful of differing opinions, viewpoints, and experiences 23 | * Giving and gracefully accepting constructive feedback 24 | * Accepting responsibility and apologizing to those affected by our mistakes, 25 | and learning from the experience 26 | * Focusing on what is best not just for us as individuals, but for the overall 27 | community 28 | 29 | Examples of unacceptable behavior include: 30 | 31 | * The use of sexualized language or imagery, and sexual attention or advances of 32 | any kind 33 | * Trolling, insulting or derogatory comments, and personal or political attacks 34 | * Public or private harassment 35 | * Publishing others' private information, such as a physical or email address, 36 | without their explicit permission 37 | * Other conduct which could reasonably be considered inappropriate in a 38 | professional setting 39 | 40 | ## Enforcement Responsibilities 41 | 42 | Community leaders are responsible for clarifying and enforcing our standards of 43 | acceptable behavior and will take appropriate and fair corrective action in 44 | response to any behavior that they deem inappropriate, threatening, offensive, 45 | or harmful. 46 | 47 | Community leaders have the right and responsibility to remove, edit, or reject 48 | comments, commits, code, wiki edits, issues, and other contributions that are 49 | not aligned to this Code of Conduct, and will communicate reasons for moderation 50 | decisions when appropriate. 51 | 52 | ## Scope 53 | 54 | This Code of Conduct applies within all community spaces, and also applies when 55 | an individual is officially representing the community in public spaces. 56 | Examples of representing our community include using an official e-mail address, 57 | posting via an official social media account, or acting as an appointed 58 | representative at an online or offline event. 59 | 60 | ## Enforcement 61 | 62 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 63 | reported to the community leaders responsible for enforcement at 64 | [INSERT CONTACT METHOD]. 65 | All complaints will be reviewed and investigated promptly and fairly. 66 | 67 | All community leaders are obligated to respect the privacy and security of the 68 | reporter of any incident. 69 | 70 | ## Enforcement Guidelines 71 | 72 | Community leaders will follow these Community Impact Guidelines in determining 73 | the consequences for any action they deem in violation of this Code of Conduct: 74 | 75 | ### 1. Correction 76 | 77 | **Community Impact**: Use of inappropriate language or other behavior deemed 78 | unprofessional or unwelcome in the community. 79 | 80 | **Consequence**: A private, written warning from community leaders, providing 81 | clarity around the nature of the violation and an explanation of why the 82 | behavior was inappropriate. A public apology may be requested. 83 | 84 | ### 2. Warning 85 | 86 | **Community Impact**: A violation through a single incident or series of 87 | actions. 88 | 89 | **Consequence**: A warning with consequences for continued behavior. No 90 | interaction with the people involved, including unsolicited interaction with 91 | those enforcing the Code of Conduct, for a specified period of time. This 92 | includes avoiding interactions in community spaces as well as external channels 93 | like social media. Violating these terms may lead to a temporary or permanent 94 | ban. 95 | 96 | ### 3. Temporary Ban 97 | 98 | **Community Impact**: A serious violation of community standards, including 99 | sustained inappropriate behavior. 100 | 101 | **Consequence**: A temporary ban from any sort of interaction or public 102 | communication with the community for a specified period of time. No public or 103 | private interaction with the people involved, including unsolicited interaction 104 | with those enforcing the Code of Conduct, is allowed during this period. 105 | Violating these terms may lead to a permanent ban. 106 | 107 | ### 4. Permanent Ban 108 | 109 | **Community Impact**: Demonstrating a pattern of violation of community 110 | standards, including sustained inappropriate behavior, harassment of an 111 | individual, or aggression toward or disparagement of classes of individuals. 112 | 113 | **Consequence**: A permanent ban from any sort of public interaction within the 114 | community. 115 | 116 | ## Attribution 117 | 118 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 119 | version 2.1, available at 120 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. 121 | 122 | Community Impact Guidelines were inspired by 123 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. 124 | 125 | For answers to common questions about this code of conduct, see the FAQ at 126 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at 127 | [https://www.contributor-covenant.org/translations][translations]. 128 | 129 | [homepage]: https://www.contributor-covenant.org 130 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html 131 | [Mozilla CoC]: https://github.com/mozilla/diversity 132 | [FAQ]: https://www.contributor-covenant.org/faq 133 | [translations]: https://www.contributor-covenant.org/translations 134 | 135 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | To contribute code, you can create a pull request, or send us email, or chat with us, whichever is easiest for you. 4 | 5 | To contribute money, you can use PayPal to send money to sixarm@sixarm.com, or email us to ask about other ways. 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tmux-conf 2 | 3 | These are our tmux configuration files with annoations. We welcome feedback and pull requests. 4 | 5 | * You can read the files to learn what they do, and we annotate the files to help explain. 6 | 7 | * You can copy/paste any items that you like, from these files to your own `tmux.conf` file. 8 | 9 | * You can source these files in your own `tmux.conf` file. 10 | 11 | 12 | ## How to install 13 | 14 | You can copy these files anywhere you like. 15 | 16 | We prefer to copy them to a user's home config directory: 17 | 18 | ```sh 19 | $HOME/.config/tmux 20 | ``` 21 | 22 | Install 23 | 24 | ```sh 25 | git clone https://github.com/SixArm/tmux-conf.git 26 | mkdir -p $HOME/.config/tmux 27 | cp -R tmux-conf/sources $HOME/.config/tmux 28 | ``` 29 | 30 | 31 | ## How to source these files 32 | 33 | You can edit your own `.tmux.conf` file, which is typically at `~/.tmux.conf`, and add lines to it. 34 | 35 | If you want a perfectly clean setup, then use this line first: 36 | 37 | ```tmux 38 | source $HOME/.config/tmux/unbind-all-keys.conf 39 | ``` 40 | 41 | If you want to set variables so you know the version and platform, then add these: 42 | 43 | ```tmux 44 | source $HOME/.config/tmux/version.conf 45 | source $HOME/.config/tmux/platform.conf 46 | ``` 47 | 48 | If you want version-specific settings, then add any of them, such as: 49 | 50 | ```tmux 51 | source $HOME/.config/tmux/version-specific/3.3/mouse.conf 52 | source $HOME/.config/tmux/version-specific/3.3/status-style-is-black-on-white.conf 53 | ``` 54 | 55 | If you want platform-specific settings for macOS, then add any of them, such as: 56 | 57 | ```tmux 58 | source $HOME/.config/tmux/platform-specific/darwin/tmux.conf 59 | ``` 60 | 61 | If you want any more settings, then add their respective lines: 62 | 63 | ```tmux 64 | source $HOME/.config/tmux/base-index-pane-number-is-1.conf 65 | source $HOME/.config/tmux/mouse.conf 66 | source $HOME/.config/tmux/prefix-is-control-a.conf 67 | source $HOME/.config/tmux/select-window-via-meta-number.conf 68 | source $HOME/.config/tmux/select-layout-via-brackets.conf 69 | source $HOME/.config/tmux/select-pane-via-hjkl.conf 70 | source $HOME/.config/tmux/shell.conf 71 | source $HOME/.config/tmux/split-window.conf 72 | source $HOME/.config/tmux/status-via-powerline.conf 73 | source $HOME/.config/tmux/switch-session-via-name.conf 74 | source $HOME/.config/tmux/zoom-via-plus-minus.conf 75 | ``` 76 | 77 | 78 | ## Version-specific settings 79 | 80 | See the directory `version-specific`. 81 | 82 | We use version-specific files to help us run tmux on many systems, 83 | including systems where we can't easily upgrade tmux ourselves. 84 | 85 | For example, when we use version 3.0 then we want to set the mouse like this: 86 | 87 | ```tmux 88 | set -g mouse on 89 | ``` 90 | 91 | ## Platform-specific settings 92 | 93 | See the directory. `platform-specific`. 94 | 95 | We use platform-specific files to help us run tmux on many systems. 96 | 97 | For example, when we use the macOS platform a.k.a. Darwin, 98 | then we want this setting: 99 | 100 | ```tmux 101 | # After copying to a tmux buffer, hit y again to copy to clipboard. 102 | bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" 103 | ``` 104 | 105 | ## Suppress warnings 106 | 107 | If you want, you can use `set -q` to suppress warnings from nonexistent options. This which has been supported since tmux 1.7. 108 | 109 | For example the option `mouse-utf8` exists in tmux 2.0 but does not exist in tmux 3.0, so you can set the optiona and suppress warnings like this: 110 | 111 | ```tmux 112 | set -q mouse-utf8 on 113 | ``` 114 | 115 | ## Primer 116 | 117 | A good tmux primer: 118 | 119 | * http://tangosource.com/blog/a-tmux-crash-course-tips-and-tweaks/ 120 | 121 | 122 | ## Notation 123 | 124 | Keys: 125 | 126 | * C-x means press the control key and x key 127 | 128 | * M-x means press the alt key and x key 129 | 130 | What is a session, a window, a pane? 131 | 132 | * A session is a set of windows. 133 | 134 | * A window is a single screen covered with panes. 135 | 136 | * A pane is a part of a window that runs a specific command, e.g. a shell. 137 | 138 | 139 | ## Use SSH to help with window naming 140 | 141 | If you want to use SSH and have each new SSH window cause its own window naming, 142 | then add this to your tmux config file, typically `~/.tmux.conf`: 143 | 144 | ```tmux 145 | set-option -g allow-rename on 146 | ``` 147 | 148 | And add code like this to your SSH config file, typically `~/.ssh/config`: 149 | 150 | ```ssh 151 | Host * 152 | PermitLocalCommand yes 153 | LocalCommand if [[ $TERM == screen* ]]; then printf "\033k%h\033\\"; fi 154 | ``` 155 | 156 | When we sign in to a server, The code runs a command to print the server's 157 | local hostname with an escape sequence that triggers tmux to set the window title. 158 | If we open the list of windows (ctrl-a w) we see each window's server name. 159 | This is also the reason why I have automatic window renaming turned off. 160 | 161 | Note: The allow-rename option was added in tmux 1.6 and with default on. The allow-rename default changed after tmux 2.7 from on to off. If allow-rename is off, then the SSH code to rename each window will not have any effect 162 | 163 | Credits: 164 | 165 | * http://www.unwiredcouch.com/2013/11/15/my-tmux-setup.html 166 | 167 | * https://www.reddit.com/user/moobarmoobar/ 168 | 169 | 170 | ## See also 171 | 172 | * http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/ 173 | 174 | * https://wiki.archlinux.org/index.php/Tmux 175 | 176 | 177 | ## Thanks 178 | 179 | Thanks to many people on the net for providing tmux conf files, 180 | and blogging about how to set tmux and its related tools. 181 | 182 | * https://gist.github.com/andreyvit/2921703 183 | * https://github.com/terryma/dotfiles/blob/master/.tmux.conf 184 | * http://www.mindfuzz.net/?p=178 185 | * http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/ 186 | * http://www.unwiredcouch.com/2013/11/15/my-tmux-setup.html 187 | * http://stackoverflow.com/questions/35016458 188 | * http://stackoverflow.com/users/5353461/tom-hale 189 | * https://github.com/HaleTom 190 | 191 | 192 | ## Key bindings 193 | 194 | The command key bindings also with our preferred bindings in brackets. 195 | 196 | ```txt 197 | C-b Send the prefix key through to the application. [we prefer C-a] 198 | C-o Rotate the panes in the current window forwards. 199 | C-z Suspend the tmux client. 200 | ! Break the current pane out of the window. 201 | " Split the current pane into two, top and bottom. 202 | # List all paste buffers. 203 | $ Rename the current session. 204 | | [%] Split the current pane into two, left and right. 205 | _ Split the current pane into two, top and bottom. 206 | & Kill the current window. 207 | ' Prompt for a window index to select. 208 | , Rename the current window. 209 | n/a [-] Delete the most recently copied buffer of text. 210 | . Prompt for an index to move the current window. 211 | 0 to 9 Select windows 0 to 9. 212 | ; [:] Enter the tmux command prompt. 213 | n/a [;] Move to the previously active pane. 214 | = Choose which buffer to paste interactively from a list. 215 | + Change a pane to a window. [custom] 216 | - Change a window to a pane. [custom] 217 | ? List all key bindings. 218 | D Choose a client to detach. 219 | [ Enter copy mode to copy text or view the history. 220 | ] Paste the most recently copied buffer of text. 221 | c Create a new window. 222 | d Detach the current client. 223 | f Prompt to search for text in open windows. 224 | i Display some information about the current window. 225 | l Move to the previously selected window. 226 | n Change to the next window. 227 | o Select the next pane in the current window. 228 | p Change to the previous window. 229 | q Briefly display pane indexes. 230 | r Force redraw of the attached client. 231 | s Select a new session for the attached client interactively. 232 | L Switch the attached client back to the last session. 233 | t Show the time. 234 | w Choose the current window interactively. 235 | x Kill the current pane. 236 | { Swap the current pane with the previous pane. 237 | } Swap the current pane with the next pane. 238 | ~ Show previous messages from tmux, if any. 239 | Page Up Enter copy mode and scroll one page up. 240 | ↑ ↓ ← → Change to the pane up, down, left, right of the current pane. 241 | M-1 to M-5 Arrange panes in one of the five preset layouts: even- 242 | horizontal, even-vertical, main-horizontal, main- 243 | vertical, or tiled. 244 | M-n Move to the next window with a bell or activity marker. 245 | M-o Rotate the panes in the current window backwards. 246 | M-p Move to the previous window with a bell or activity 247 | marker. 248 | C-↑ C-↓ 249 | C-←, C-→ 250 | Resize the current pane in steps of one cell. 251 | M-↑, M-↓ 252 | M-←, M-→ 253 | Resize the current pane in steps of five cells. 254 | ``` 255 | 256 | 257 | ## Tracking 258 | 259 | * Package: sixarm.com/tmux-conf 260 | * Version: 5.1.0 261 | * Created: 2014-11-29 262 | * Updated: 2020-03-20 263 | * Contact: Joel Parker Henderson (joel@joelparkerhenderson.com) 264 | * License: GPL 265 | -------------------------------------------------------------------------------- /sources/base-index-pane-number-is-1.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # The tmux pane number default is 0. 3 | # 4 | # On our keyboards, this is a stretch to type, 5 | # because -0 is in the far upper right. 6 | # 7 | # We prefer to start pane numbering at 1, 8 | # because 1 is easier to reach on our keyboards. 9 | ## 10 | 11 | set -g base-index 1 12 | 13 | -------------------------------------------------------------------------------- /sources/mouse.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse Mode 3 | # 4 | # Read about the pros and cons of mouse mode here: 5 | # http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/ 6 | # 7 | # If you're using a Mac and iTerm2, then you can temporarily disable 8 | # mouse mode by pressing option and holding it down. 9 | # 10 | # ## Mac OS X Notes 11 | # 12 | # If you're using Mac OS X then you may want to install MouseTerm. 13 | # MouseTerm is a SIMBL plugin for Mac OS X's Terminal.app that passes 14 | # mouse events to the terminal, allowing you to use mouse shortcuts 15 | # within applications that support them. 16 | # 17 | # To get started, first install SIMBL (MouseTerm won't work without it!). 18 | # SIMBL is SIMple Bundle Loader, pronounced like "symbol" or "cymbal". 19 | # It enables hacks and plugins, such as extensions to apps and OS X. 20 | # 21 | # One way to install SIMBL: 22 | # 23 | # brew cask install easysimbl 24 | # 25 | # Then download MouseTerm, open the .dmg file, and run Install. 26 | # Restart Terminal.app, and your mouse should now be working. 27 | # 28 | # Get MouseTerm: https://bitheap.org/mouseterm/ 29 | # 30 | # ## Version 31 | # 32 | # In version 2.0 and less, the mouse had 4 mouse options. 33 | # 34 | # set -g mode-mouse on 35 | # set -g mouse-resize-pane on 36 | # set -g mouse-select-pane on 37 | # set -g mouse-select-window on 38 | # 39 | # In version 2.1 and less, the mouse needs UTF8 setting: 40 | # 41 | # set -g mouse-utf8 on 42 | # 43 | # In version 2.1, one "mouse" setting replaced the earlier 4 settings. 44 | # 45 | # set -g mouse on 46 | # 47 | ## 48 | 49 | ## 50 | # Wheel 51 | ## 52 | 53 | bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M 54 | bind -n WheelDownPane select-pane -t= \; send-keys -M 55 | -------------------------------------------------------------------------------- /sources/platform-specific/darwin/tmux.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Our tmux configurations that are platform-specific for macOS. 3 | # 4 | # This file is sourced by our `tmux.conf` file. 5 | ## 6 | 7 | # After copying to a tmux buffer, hit y again to copy to clipboard. 8 | bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" 9 | 10 | # The tmux server, and its children, automatically and uncontrollably 11 | # lose access to what would have been their original bootstrap namespace, 12 | # i.e. the one that has access to the pasteboard service. 13 | # 14 | # So we install the program `reattach-to-user-namespace` which provides a 15 | # wrapper program, which enables us to launch a process and have that process 16 | # be attached to the per-user bootstrap namespace, to make the program behave. 17 | # 18 | # See http://www.economyofeffort.com/2013/07/29/reattach-to-user-namespace-the-fix-for-your-tmux-in-os-x-woes/ 19 | # 20 | # To install via Homebrew: 21 | # 22 | # $ brew install reattach-to-user-namespace 23 | # 24 | # To install via MacPorts: 25 | # 26 | # $ port install tmux-pasteboard 27 | # 28 | #set-option -g default-command "reattach-to-user-namespace -l zsh" 29 | -------------------------------------------------------------------------------- /sources/platform-specific/linux/tmux.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Our tmux configurations that are platform-specific for Linux. 3 | # 4 | # This file is sourced by our `tmux.conf` file. 5 | ## 6 | 7 | # This file is intentionally blank for the time being, 8 | # because we currently don't have any Linux specific needs. 9 | -------------------------------------------------------------------------------- /sources/platform.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Set the tmux platform in the environment, 3 | # so we can use any results in later commands. 4 | ## 5 | 6 | run-shell "tmux setenv -g TMUX_PLATFORM $(uname)" 7 | -------------------------------------------------------------------------------- /sources/prefix-is-control-a.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Make tmux use C-a for the hot key, instead of C-b. 3 | # 4 | # We prefer C-a because it's faster to type than C-b, 5 | # and it's easy to type when we change the computer 6 | # keyboard "Caps Lock" key to send "Control" instead. 7 | # 8 | # Some people prefer to use C-a because it's the same key 9 | # that the `screen` multiplexer uses, and also easy to type. 10 | # 11 | # Some people prefer to *not* use C-a because its often 12 | # used by the emacs editor, and also the shell line editor, 13 | # to mean "go to beginning of line"; we use this often. 14 | # In our opinion, the usefulness of C-a for tmux makes it 15 | # worth doing, and we enable C-a C-a for emacs and line editing. 16 | ## 17 | 18 | # Set tmux prefix to Control-a 19 | set -g prefix C-a 20 | 21 | # Set 'C-a C-a' to type 'C-a' 22 | bind-key C-a send-prefix 23 | 24 | # Unset tmux prefix Control-b 25 | unbind C-b 26 | -------------------------------------------------------------------------------- /sources/select-layout-via-brackets.conf: -------------------------------------------------------------------------------- 1 | # Bind [ and ] to some common used layout 2 | bind [ select-layout even-horizontal 3 | bind ] select-layout even-vertical 4 | -------------------------------------------------------------------------------- /sources/select-pane-via-hjkl.conf: -------------------------------------------------------------------------------- 1 | # Select pane similar to vi keybindings 2 | bind h select-pane -L 3 | bind j select-pane -D 4 | bind k select-pane -U 5 | bind l select-pane -R 6 | -------------------------------------------------------------------------------- /sources/select-window-via-meta-number.conf: -------------------------------------------------------------------------------- 1 | # Shortcuts M-[0-9] to switch to window [0-9]. 2 | # These are a bit faster to use than C-b [0-9]. 3 | # 4 | # We prefer being able to use M-[0-9] within our editor, 5 | # so we typically do not source these on our own systems. 6 | 7 | bind -n M-0 select-window -t :0 8 | bind -n M-1 select-window -t :1 9 | bind -n M-2 select-window -t :2 10 | bind -n M-3 select-window -t :3 11 | bind -n M-4 select-window -t :4 12 | bind -n M-5 select-window -t :5 13 | bind -n M-6 select-window -t :6 14 | bind -n M-7 select-window -t :7 15 | bind -n M-8 select-window -t :8 16 | bind -n M-9 select-window -t :9 17 | -------------------------------------------------------------------------------- /sources/shell.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Set the default shell. 3 | # 4 | # To maximize user flexibility, 5 | # use an environment variable: 6 | # 7 | # set -g default-shell "$SHELL" 8 | # 9 | # To maximize hardcoded security, 10 | # use a fully qualified path to a binary: 11 | # 12 | # default-shell "/usr/local/bin/zsh" 13 | # 14 | # To maximize convenience, 15 | # use a simple command: 16 | # 17 | # set -g default-command "bash" 18 | ## 19 | 20 | # Set the shell to use the env var. 21 | set -g default-shell "$SHELL" 22 | 23 | ## 24 | # Shell related settings 25 | ## 26 | 27 | # Reload the tmux conf file; this is useful when we edit as we go. 28 | bind r source-file ~/.tmux.conf \; display 'Config reloaded' 29 | 30 | # Remember many command line history lines. 31 | set -g history-limit 1000000 32 | 33 | # Set the terminal type so colors get rendered correctly 34 | set -g default-terminal "screen-256color" 35 | 36 | # Make switching to cmd mode in zsh quick. 37 | set -s escape-time 0 38 | 39 | # Sane scrolling 40 | # set -g terminal-overrides 'xterm*:smcup@:rmcup@' 41 | set -g terminal-overrides '\*:smcup@:rmcup@' 42 | 43 | # ;: Command prompt 44 | bind \; command-prompt 45 | -------------------------------------------------------------------------------- /sources/split-window.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Windows 3 | ## 4 | 5 | # Split window horizontally or vertically 6 | bind | split-window -h 7 | bind _ split-window -v 8 | -------------------------------------------------------------------------------- /sources/status-via-powerline.conf: -------------------------------------------------------------------------------- 1 | 2 | ## 3 | # Status via Powerline shell script 4 | ## 5 | 6 | set -g status on 7 | set -g status-interval 2 8 | #set -g status-utf8 on 9 | set -g status-justify "centre" 10 | set -g status-left-length 100 11 | set -g status-right-length 100 12 | set -g status-left "#(powerline.sh left)" 13 | set -g status-right "#(powerline.sh right)" 14 | set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]#[fg=colour255, bg=colour27] #I  #W #[fg=colour27, bg=colour235]" 15 | -------------------------------------------------------------------------------- /sources/status.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Status Bar 3 | # 4 | # Examples: 5 | # 6 | # #H Host name. 7 | # #S Session name. 8 | # #W Window name. 9 | # #I Window index. 10 | # #F Window flags. 11 | # #P Pane index. 12 | # #T Pane title. 13 | # #[default] Use the default colors. 14 | # #[fg=blue] Set foreground color. 15 | # #[fg=blue,dim] Set foreground color with dim contrast. 16 | # #[fg=blue,bg=black] Set foreground color and background color. 17 | # %Y-%m-%d The current date, formatted as YYYY-MM-DD. 18 | # #(whoami) Run the command, such as `whoami`, `date`, etc. 19 | ## 20 | 21 | # Set frequency of status line updates. 22 | set -g status-interval 60 23 | 24 | # Status bar, left side. 25 | set -g status-left-length 50 26 | set -g status-left '#H #S' 27 | 28 | # Status bar, right side. 29 | set -g status-right-length 50 30 | set -g status-right '' 31 | 32 | # Current or active window in status bar 33 | #set-window-option -g window-status-current-bg yellow 34 | #set-window-option -g window-status-current-fg black 35 | set-window-option -g window-status-current-format '#I:#W#F' 36 | 37 | # Inactive windows in status bar 38 | set-window-option -g window-status-format '#I:#W#F' 39 | 40 | # Listen to alerts from all windows 41 | set -g bell-action any 42 | 43 | #--Usability-------------------------------------------------------------------- 44 | #set-option -g status-keys vi 45 | #set-window-option -g mode-keys vi 46 | # keep tmux msgs around longer 47 | set -g display-time 3000 48 | # set -g set-titles off 49 | # Set window notifications 50 | #set-window-option -g monitor-activity on 51 | #set -g visual-activity on 52 | #setw -g automatic-rename off 53 | -------------------------------------------------------------------------------- /sources/switch-session-via-name.conf: -------------------------------------------------------------------------------- 1 | ## Fast session switching, by prompting for the session name. 2 | unbind S 3 | bind S command-prompt "switch -t %1" 4 | -------------------------------------------------------------------------------- /sources/unbind-all-keys.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Some of our teammates pefer to unbind all keys first. 3 | # This guarantees a clean slate. Use this if you want it. 4 | ## 5 | 6 | # Unbind all keys 7 | unbind-key -a 8 | -------------------------------------------------------------------------------- /sources/version-specific/1.9/mouse.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse 3 | ## 4 | 5 | set -g mouse-utf8 on 6 | set -g mode-mouse on 7 | set -g mouse-resize-pane on 8 | set -g mouse-select-pane on 9 | set -g mouse-select-window on 10 | -------------------------------------------------------------------------------- /sources/version-specific/1.9/utf8.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # UTF8 3 | ## 4 | 5 | setw -g utf8 on 6 | set -g status-utf8 on 7 | -------------------------------------------------------------------------------- /sources/version-specific/2.0/mouse.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse 3 | ## 4 | 5 | set -g mouse-utf8 on 6 | set -g mode-mouse on 7 | set -g mouse-resize-pane on 8 | set -g mouse-select-pane on 9 | set -g mouse-select-window on 10 | -------------------------------------------------------------------------------- /sources/version-specific/2.0/utf8.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # UTF8 3 | ## 4 | 5 | setw -g utf8 on 6 | set -g status-utf8 on 7 | -------------------------------------------------------------------------------- /sources/version-specific/2.1/mouse.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse 3 | ## 4 | 5 | set -g mouse on 6 | set -g mouse-ut8 on 7 | -------------------------------------------------------------------------------- /sources/version-specific/2.1/utf8.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # UTF8 3 | ## 4 | 5 | setw -g utf8 on 6 | set -g status-utf8 on 7 | -------------------------------------------------------------------------------- /sources/version-specific/2.2/tmux.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse 3 | ## 4 | 5 | set -g mouse on 6 | -------------------------------------------------------------------------------- /sources/version-specific/2.3/tmux.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse 3 | ## 4 | 5 | set -g mouse on 6 | -------------------------------------------------------------------------------- /sources/version-specific/3.0/mouse.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse 3 | ## 4 | 5 | set -g mouse on 6 | -------------------------------------------------------------------------------- /sources/version-specific/3.0/status-color-is-black-on-white.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Set the status line colors to black on white. 3 | ## 4 | 5 | set -g status-fg black 6 | set -g status-bg white -------------------------------------------------------------------------------- /sources/version-specific/3.1/mouse.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse 3 | ## 4 | 5 | set -g mouse on 6 | -------------------------------------------------------------------------------- /sources/version-specific/3.1/status-color-is-black-on-white.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Set the status line colors to black on white. 3 | ## 4 | 5 | set -g status-fg black 6 | set -g status-bg white 7 | -------------------------------------------------------------------------------- /sources/version-specific/3.2/mouse.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse 3 | ## 4 | 5 | set -g mouse on 6 | -------------------------------------------------------------------------------- /sources/version-specific/3.2/status-style-is-black-on-white.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Set the status style colors to black on white. 3 | ## 4 | 5 | set-option -g status-style fg=black,bg=white 6 | -------------------------------------------------------------------------------- /sources/version-specific/3.3/mouse.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Mouse 3 | ## 4 | 5 | set -g mouse on 6 | -------------------------------------------------------------------------------- /sources/version-specific/3.3/status-style-is-black-on-white.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Set the status style colors to black on white. 3 | ## 4 | 5 | set-option -g status-style fg=black,bg=white 6 | -------------------------------------------------------------------------------- /sources/version.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Set the tmux version in the environment, 3 | # so we can use any results in later commands. 4 | ## 5 | 6 | run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | sed 's/tmux //')" 7 | -------------------------------------------------------------------------------- /sources/zoom-via-plus-minus.conf: -------------------------------------------------------------------------------- 1 | ## 2 | # Change a pane to a window by using + then back to a pane by using -. 3 | # This can be helpful for native mouse copy-paste, which tends to work 4 | # when the item is in a window, but doesn't work when the item is in a pane. 5 | ## 6 | 7 | # Zoom a pane to a window. 8 | unbind + 9 | bind + \ 10 | new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\ 11 | swap-pane -s tmux-zoom.0 \;\ 12 | select-window -t tmux-zoom 13 | 14 | # Unzoom a window to a pane. 15 | unbind - 16 | bind - \ 17 | last-window \;\ 18 | swap-pane -s tmux-zoom.0 \;\ 19 | kill-window -t tmux-zoom 20 | 21 | --------------------------------------------------------------------------------