# vim: ft=tmux
# https://raw.githubusercontent.com/seebi/tmux-colors-solarized/master/tmuxcolors-256.conf
source-file ~/dotfiles/tmux/tmuxcolors-256.conf

# Default status line options.
set-option -g status on
set-option -g status-interval 2
set-option -g status-bg colour234
set-option -g status-fg colour231
set-option -g status-attr default

# Central window list.
# `#I` = index, `#F` = last window indicator, `#W` = window name
set-option -g status-justify "centre"
set-option -g window-status-format "#[bg=colour234] #[fg=colour244]#I#[fg=red] #[fg=colour249]#W "
set-option -g window-status-current-format "#[bg=red] #[fg=colour231]#I #[bold]#W "

# Left status.
# `#S` session name, `#h` = hostname
set-option -g status-left-length 90
set-option -g status-left '#[fg=colour189,bg=colour55] #h #[fg=colour55,bg=colour233] #S #[fg=colour233,bg=colour234] '

# Right status.
# `#H:#M %d/%m/%y` = hours, minutes, day, month, year
set-option -g status-right-length 90
set-option -g status-right '#[fg=colour233] #[fg=colour166,bg=colour233] %H:%M #[fg=colour233,bg=colour166] %d/%m/%y #(rainbarf --remaining --rgb --width 10)'


if-shell '[[ $(version-compare $(tmux -V | sed "s/[tmux ]//g") 2.1) -le 0 ]]' 'set-option -g status-utf8 on'
if-shell '[[ $(version-compare $(tmux -V | sed "s/[tmux ]//g") 2.1) -ge 0 ]]' 'source-file ~/dotfiles/tmux/tmuxcolours2.conf'
