:green_book: Example tmux configuration - screen + vim key-bindings, system stat, cpu load bar.
tmux is a terminal multiplexer.
- Requires tmux 3.2+ (best experience on 3.4+).
- Support for tmux-mem-cpu-load.
- Prefix mapped to Ctrl-A for
screenusers.
Want more tmux? Check out the libtmux python library for controlling tmux, and load your code projects via YAML/JSON with tmuxp.
Share your .dot-configs
Have a tmux configuration you'd like to share? Whether a fork of this project, another's, or your own, submit it to awesome-tmux-configs.
Installation
Download:
git clone --recursive https://github.com/tony/tmux-config.git ~/.tmux
Copy tmux config to home:
ln -s ~/.tmux/.tmux.conf ~/.tmux.conf
Go to config dir:
cd ~/.tmux
Stats
tmux-mem-cpu-load
Works on Linux and OS X.
Prep ourself to download submodule (if you forgot --recursive when cloning):
git submodule init
Download submodule:
git submodule update
Change dir to tmux-mem-cpu-load:
cd ~/.tmux/vendor/tmux-mem-cpu-load
Make _build directory and cd into it:
mkdir build; cd build
General make file:
cmake ..
Compile binary:
make
Install our binary to /usr/local/bin/tmux-mem-cpu-load:
sudo make install
(No need to do sudo if on OS X / macOS)
Go home:
cd ~
Launch tmux:
tmux
And press Control + a then d to go back to the terminal.
Update config:
tmux source-file ~/.tmux.conf
Powerline (Advanced)
You can add suport for powerline by adding these to your ~/.tmux.conf. Be sure to grab and install powerline-fonts for your system.
See Powerline on ReadTheDocs.org for more info.
Start tmux
To start a session:
tmux
To reattach a previous session:
tmux attach
To reload config file
<Control + a>: then source-file ~/.tmux.conf
Commands
Our prefix/leader key is Control + a now (just like the screen multiplexer). This sequence must be typed before any tmux shortcut.
Control + abefore any commandControl + athen?to bring up list of keyboard shortcuts (with descriptions)Control + athen"to split window horizontallyControl + athenvto split window verticallyControl + athen<Space>to open quick-action menuControl + athenoto rotate panesControl + athenh,j,k,lto move left, down, up, right (vim hjkl)Control + athen;to go to last panel
Control + athencto create a new windowControl + athennto next windowControl + athenpto previous windowControl + athen[0-9]move to window numberControl + athen&to kill window
Control + athenmto switch tomain-horizontallayout with the main pane at 66% height.Control + athenMto switch tomain-verticallayout with the main pane at 50% width.Control + athentto open a popup shell (80% of screen, 3.2+).Control + athengto open a popup withgit log --oneline --graph(3.2+).
More configs / Tools
- Save / Load your tmux workspaces through JSON or YAML with
- Clone + Synchronize your git / hg / svn projects through JSON / YAML with
- Modular, Lazy-loading vim configuration with support for C, C++, Python, Go and Javascript with
- Modular dot-config example tony/.dot-config
Other
- Github: http://www.github.com/tony
- Website: http://www.git-pull.com
- LICENSE: MIT
- Author: Tony Narlock (tony@git-pull.com)