Home > Uncategorized > Make your tmux look and work better

Make your tmux look and work better

I love using tmux. Besides the excellent scripting support (see my other post ), tmux is quite easy to customize to fit your need.

Here’s my tmux config: https://github.com/midnightcodr/my_tmux_conf/blob/master/.tmux.conf

The screenshot: https://github.com/midnightcodr/my_tmux_conf/blob/master/my_tmux_status_bar.png

To use, follow https://github.com/midnightcodr/my_tmux_conf/blob/master/README.md

Notes:
1. Credit goes to http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/
2. I found using different color settings the most effect way to avoid accidental mistakes when working with test and production server, for example for production environment I use white on red (convenient color for caution?) for the current window tab color, for test environment I use black on yellow for the same element.

Feed-backs and comments are welcome!

[ UPDATE 6/6/2012 ] Finally I came up with the following status line that works on both Mac OSX and Linux regardless what the output of command uptime is:
set -g status-right '#[fg=yellow]#(uptime | egrep -o "[0-9]+ users?, +load.*"|perl -pe "s| averages?||"), %H:%M'

The challenge I found setting tmux status with command lines is that group capturing regex won’t work with tmux. For example, the following config set -g status-right '#[fg=yellow]#(uptime|perl -pe "s#.*,(\s+\d+ users.*)#\1#;s# averages?##"), %H:%M'
would end up 1saverages?#"), 23:44 showing in the status bar (right corner).

Advertisements
Categories: Uncategorized
  1. One User
    August 29, 2014 at 6:08 pm

    Thank you!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: