tmux and screen

So which one do you prefer?

Personally I love tmux mainly for these 2 big reasons:

  1. ability to split windows vertical or horizontal, useful when in need to debug a program or script.
  2. configuring it according to my taste is a lot easier than screen.

So inline will be example for the config for both software’s:

Screen – for most of my case scenarios this is more than enough, but if you want to play around with the settings and configs then you will have a hard time digging in screen manual. Although I search online before I was happy, I ended up by having this config for my screen:

~/.screenrc
altscreen on
startup_message off
caption always '%{= dr} %H %{G}| %{w}%l %{G}|%=%?%{d}%-w%?%{r}(%{b}%n %t%? {%u} %?%{r})%{d}%?%+w%?%=%{G}| %{y}%M %d %c:%s '
defscrollback 5000

Tmux – tmux does what screen does but it’s configuration is a lot easier to perform. As you can see by my config, it is human friendly unlike screen. For this config to work as expected, you should have an alias for tmux as ‘tmux -2’.

~/.tmux.conf
set -g default-terminal "screen-256color"
set -g history-limit 10000

############################################################################
# Status Bar
############################################################################
set-option -g status-utf8 on
set-option -g status-justify centre
set-option -g status-bg black
set-option -g status-fg cyan
set-option -g status-interval 3
set-option -g status-left-length 50
set-option -g status-left ‘#[fg=red]» #[fg=blue]#h# #[fg=colour128]#(uptime |cut -d ‘,’ -f 3,4,5)#[default]’
set-option -g status-right ‘#[fg=red] #[fg=cyan] »» #[fg=blue]###S #[fg=colour184]%R %d-%m-%y#2#[default]’

set-option -g visual-activity on
set-option -g set-titles on
set-option -g set-titles-string ‘#H’

set-window-option -g window-status-current-bg red
setw -g mode-keys vi

bind-key : command-prompt
bind-key r refresh-client
bind-key L clear-history
bind-key v split-window -h
bind-key h split-window -v

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s