Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using the following screen status line, configured in my screenrc:

screen status

I configured it using the following line:

hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'

I did not create this theme, I don't remember where I found it, but I really like it.

I am now converting my configuration to tmux and I can't seem to replicate this configuration in my tmux.conf.

I got this far:

set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
set-window-option -g window-status-current-attr bright
set-window-option -g window-status-current-bg red

Which produces this line:

tmux status]

Please ignore the different hostname, it's on a different server

What configuration can I use in tmux to produce a status line similar to the first one?

Thank you!

share|improve this question

2 Answers 2

up vote 5 down vote accepted

With the exception of the red brackets around the highlighted window, this is the closest approximation that I can easily configure in tmux 1.5:

# default statusbar colors
set -g status-fg white
set -g status-bg default

# default window title colors
set-window-option -g window-status-fg white
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim

# active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright

# statusline
set -g status-left '#[fg=green][ #H ]['
set -g status-right '#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%I:%M #[fg=green]]'

tmux statusline

If you want the highlighted window in red, use:

set-window-option -g window-status-current-fg red
share|improve this answer
    
Thanks, looks great! –  simao Sep 4 '11 at 4:01

You can try this too:

set-window-option -g window-status-current-format "#[fg=red](#[fg=white]#I#F$ #W#[fg=red])"
set-window-option -g window-status-format "#[fg=normal]#I#F$ #W"

Makes your window list look like in your screen configuration.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.