Coder Social home page Coder Social logo

tmux's Introduction

Tmux is a terminal multiplexer. Tested with tmux 1.5+.

This config has support for tmux-mem-cpu.

Prefix mapped to Ctrl-A for screen users.

Installation

Download:

git clone 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

(Linux-only)

Prep ourself to download submodule:

git submodule init

Download submodule:

git submodule update

Change dir to tmux-mem-cpu-load:

cd ~/.tmux/vendor/tmux-mem-cpu-load

General make file:

cmake .

Compile our binary:

make

Install our binary to /usr/local/bin/tmux-mem-cpu-load:

sudo make install

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'
# using python3.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'

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 60% height.

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

tmux's People

Contributors

4a6f656c avatar bob-beck avatar cjeker avatar ischwarze avatar jonathangray avatar marcespie avatar mathstuf avatar mherrb avatar mkilian avatar nicm avatar sebastianbenoit avatar semarie avatar sthen avatar stspdotname avatar thomasadam avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.