• Stars
    star
    1,751
  • Rank 26,421 (Top 0.6 %)
  • Language
    Shell
  • Created over 14 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

📗 Example tmux configuration - screen + vim key-bindings, system stat, cpu load bar.

tmux is a terminal multiplexer.

  • Tested with tmux 1.5+.
  • Support for tmux-mem-cpu-load.
  • Prefix mapped to Ctrl-A for screen users.

New to tmux? The Tao of tmux is now available on Leanpub and Amazon Kindle. Read and browse the book for on the web.

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

basic-cpu-and-memory.tmux

(Cross platform, tested with python 2.7+)

Update March 19, 2014. Works with psutil 2.0 now.

Install psutil:

sudo pip install psutil

Copy ~/.tmux/vendor/basic-cpu-and-memory.tmux to bin:

sudo cp ~/.tmux/vendor/basic-cpu-and-memory.tmux /usr/local/bin/tmux-mem-cpu-load

make executable:

sudo chmod +x /usr/local/bin/tmux-mem-cpu-load

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.

# pip install --user git+git://github.com/powerline/powerline
if-shell 'test -f ~/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf' 'source-file ~/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf'

# [sudo] pip install git+git://github.com/powerline/powerline
if-shell 'test -f /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf'

# [sudo] pip install git+git://github.com/powerline/powerline
if-shell 'test -f /usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf'
# python 3.3 ?
if-shell 'test -f /usr/local/lib/python3.3/dist-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python3.3/dist-packages/powerline/bindings/tmux/powerline.conf'
# python 3.4 ?
# if-shell 'test -f /usr/local/lib/python3.4/dist-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python3.4/dist-packages/powerline/bindings/tmux/powerline.conf'
# python 3.5 ?
# if-shell 'test -f /usr/local/lib/python3.5/dist-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python3.5/dist-packages/powerline/bindings/tmux/powerline.conf'
# python 3.6 ?
# if-shell 'test -f /usr/local/lib/python3.6/dist-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python3.6/dist-packages/powerline/bindings/tmux/powerline.conf'

Start tmux

To start a session:

tmux

To reattach a previous session:

tmux attach

To reload config file

<Control + b>: (which could Ctrl-B or Ctrl-A if you overidden it) 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 + a before any command
  • Control + a then ? to bring up list of keyboard shortcuts
  • Control + a then " to split window
  • Control + a then <Space> to change pane arrangement
  • Control + a then o to rotate panes
  • Control + a then h, j, k, l to move left, down, up, right. Respectively. (vim hjkl)
  • Control + a then ; to go to last panel

Beyond your first window:

  • Control + a then c to create a new window
  • Control + a then n to next window
  • Control + a then p to previous window
  • Control + a then [0-9] move to window number
  • Control + a then & to kill window

Custom:

  • Control + a then m to switch to main-horizontal layout with the main window at 2/3 height..
  • Control + a then M to switch to main-vertical layout with the main window at half width.

More configs / Tools

  • Save / Load your tmux workspaces through JSON or YAML with tmuxp.
  • Clone + Synchronize your git / hg / svn projects through JSON / YAML with vcspull.
  • Modular, Lazy-loading vim configuration with support for C, C++, Python, Go and Javascript with tony/vim-config
  • Modular dot-config example tony/.dot-config

Other

More Repositories

1

awesome-config

📕 Example awesome wm configuration. Includes personalization support (personal.vim), theme, polyglot unicode taglists, mpd support.
Lua
173
star
2

.dot-config

📚 Example dot configs for tmux, tmuxp, vim, vcspull, i3 and awesome
Nushell
123
star
3

NCURSES-Programming-HOWTO-examples

CMake examples for code in http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html
C
117
star
4

vim-config-framework

📗 VIM / Neovim configuration framework
Vim Script
98
star
5

cookiecutter-flask-pythonic

Pythonic starter boilerplate for Flask
Python
37
star
6

salt-states-configs

📚 states and formulas for saltstack (debian / ubuntu)
HTML
32
star
7

dot-fonts

Programmer and CJK / Unicode fonts.
Shell
28
star
8

tmuxp-config

Configs for tmuxp (https://github.com/tony/tmuxp)
Python
27
star
9

django-slugify-processor

custom slug / slugification rules for django https://devel.tech/tips/n/djms3tTe/how-django-uses-deferred-imports-to-scale
Python
15
star
10

steam-freebsd-client

based off steam linux client 1.0.0.51 - trying to get running on FreeBSD 11-CURRENT
Python
13
star
11

django-docutils

Docutils (a.k.a. reStructuredText, reST, RST) support for django
Python
12
star
12

cv

Tony Narlock's Resume (React vs Vue.js)
TypeScript
12
star
13

kohana-raven

kohana 3.2 module for raven, a client for the Sentry error reporting system.
PHP
8
star
14

sphinxcontrib-github

Use github repo and PR stats to sphinx projects
Python
8
star
15

tot-cpp-shmup

C++, CMake, SDL2 shooter minigame for The Tao of tmux and Terminal Tricks
C++
6
star
16

tot-go-webapp

Sample golang web application for The Tao of tmux and Terminal Tricks
Go
6
star
17

wxscintilla

wxscintilla updated for wxwidgets 3.0 and clang
C++
5
star
18

watching-testrunner

Command line tool for watching files and re-running shell commands.
Python
5
star
19

i3-config

Config for i3 window manager
Python
5
star
20

i3-gaps-freebsd

https://github.com/Airblader/i3 attempt at creating a config patch for adding gap support to i3
Makefile
5
star
21

xmonad-config

Ancient xmonad config (rc.lua, xmobarrc, xdefaults)
5
star
22

spectrwm-config

4
star
23

gpc

Mirror of QP Actor / HSM (Hierarchical State Machine) in C http://sourceforge.net/projects/qpc/
C
4
star
24

awesome-tmux-configs

Add your configs for tmux
3
star
25

scrotwm-config

Example scrotwm config file (.scrotwm.conf). Includes .conkyrc file for status bar. New config at https://github.com/tony/spectrwm-config
3
star
26

ncurses-example

C
3
star
27

github-exercise

BROKEN (github revokes read-only api key to circumvent throttling) Backbone + Backbone.Marionette + Bootstrap + Gulp + requirejs example
JavaScript
3
star
28

django-pure

A pythonic django 1.8 boilerplate, sans cruft, gracefully degrades to sqlite.
Python
2
star
29

screen-config

Example screen config (.screenrc). Features stats and loadbar.
2
star
30

sqlamp

sqlamp is an implementation of an efficient algorithm for working with hierarchical data structures — Materialized Path. sqlamp uses (and depends of) SQLAlchemy. https://github.com/sontek/sqlalchemy_traversal http://sqlamp.angri.ru/ https://github.com/monetizeio/sqlalchemy-orm-tree http://docs.sqlalchemy.org/en/rel_0_9/orm/relationships.html#adjacency-list-relationships https://bitbucket.org/angri/sqlamp
Python
2
star
31

bootstrap_env

POSIX sh Wrapper and adapter for bootstrapping + sourcing virtualenv, virtualenvwrapper, pyenv-virtualenv and pyenv-virtualenvwrapper projects
Shell
1
star
32

react-typescript-vanilla-starter

React + Typescript (including typed webpack v4 config) + Babel
TypeScript
1
star
33

vcsync

https://github.com/tony/vcspull in golang
Go
1
star
34

setup-python-poetry-version-example

Example of poetry + cache issue with setup-python v3.1
Python
1
star
35

iOS-TipCalculator

iOS 5.1 Example App - A tip calculator
Objective-C
1
star
36

sdl2-playproject

playing around with c/c++, cmake and sdl2
C++
1
star
37

libunwind

Including OS X fork https://opensource.apple.com/tarballs/libunwind/ / http://opensource.apple.com/source/libunwind/
C
1
star