TMUX: sleek theme

http://yalneb.blogspot.com/2016/05/tmux-sleek-theme.html

I have talked about TMUX in my previous post. It is an awesome tool that can increase your productivity exponentially. How ever, it is extremely ugly and distracting if you use the default theme.

It is difficult and very subjective to explain something visual, but I have come up with a simple, minimalist, futuristic and sleek theme that works great whether your terminal supports 256 colors, or only 16.

Do not worry, you can install my theme in less than 15 seconds and enjoy it right away.


Install a theme

TMUX by default loads a user dependent configuration file ~/.tmux.conf. To edit it symply open it with your favorite text editor. For example GEDIT.

$ gedit ~/.tmux.conf

In this file you can edit a lot of stuff and configuration, among them the default key bindings. It goes even a step further: you can write your own TMUX scripts, but we will leave that for another day. For now we will simply paste the following visual configuration into said file and save it. Once you are done, run

$ tmux -f ~/.tmux.conf

This command is needed only the first time you have done changes to the configuration file. From now on tmux will always use your configuration file.

Also, if you are looking for colorizing  your bash prompt for better aesthetics, check out this post where I explain how to colorize your bash prompt, or if you want to increase your productivity, this other post where we review some useful keybindings for TMUX.



Theme

################################################################################
##                                    DESIGN                                  ##
################################################################################

## MY COLORS:
## ---------------------------
## black:  colour232
## white:  colour255
## dark-gray:  colour234
## ligt-gray: colour7
## highlights: colour14
## attention: colour202
## decoration: colour12



## GLOBAL ######################################################################

## Colors
set -g default-terminal "screen-256color"

## Loud or quiet?
set-option -g visual-activity off  # Do not notify for events on panes
set-option -g visual-bell on
set-option -g visual-silence off
set-window-option -g monitor-activity on
set-option -g bell-action none



## WINDOWS #####################################################################

## Window selection menu (usually bound to cb-w)
setw -g mode-bg colour14
setw -g mode-fg colour232



## PANES #######################################################################

## Separation border
set -g pane-border-bg colour12
set -g pane-border-fg colour255
set -g pane-active-border-bg colour255
set -g pane-active-border-fg colour255


## Highlight current pane
set -g window-active-style 'fg=colour255,bg=colour232'  # Current pane
set -g window-style 'fg=colour7,bg=colour234'   # Other panes



## STATUS BAR ##################################################################

## Status bar design
set -g status-justify left
set -g status-interval 2
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour255


## Show PREFIX on right side when c-b
set -g status-left '#[fg=colour232,bg=colour202,bold]#{?client_prefix, <Prefix> ,}#[fg=colour255,bg=colour234,bold][#S] '
set -g status-left-length 20


## Show prefix on left & date & time
set -g status-right '#[fg=colour255,bg=colour234,bold] %d/%m/%y #[fg=colour255,bg=colour234,bold] %H:%M:%S #[fg=colour232,bg=colour202,bold]#{?client_prefix, <Prefix> ,}'
set -g status-right-length 50

## Show system load and other info
#set-option -g status-right '#(uptime | rev | cut -d":" -f1 | rev | sed s/,//g )'


## Selected window
setw -g window-status-current-fg colour232
setw -g window-status-current-bg colour14
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I:#W#F '


## Background windows
setw -g window-status-fg colour232
setw -g window-status-bg colour7
setw -g window-status-attr bold
setw -g window-status-format ' #I:#W#F '


## Background windows with event
setw -g window-status-bell-fg colour7
setw -g window-status-bell-bg colour7



## MESSAGES ####################################################################
set -g pane-border-fg colour232  
set -g pane-active-border-fg colour14
set -g message-attr bold
set -g message-fg colour232 
set -g message-bg colour14
set -g message-command-fg colour14
set -g message-command-bg colour232

3 comments :

  1. Thanks for sharing your theme.
    When i start it i get the below errors tho :(
    .tmux.conf:49: unknown option: window-active-style [0/0]
    .tmux.conf:50: unknown option: window-style

    ReplyDelete
    Replies
    1. Thank you for bringing it to my attention. I'll take a look at it, it might be something system dependent. In any case, I'll keep you posted.

      Delete
    2. After much googling and testing, it appears that you get this error probably because you are using TMUX version 1.9 (could you please confirm this?). I have version 2.4-1 right now, and I remember I already had version 2.X (can't remember exactly which one) when I wrote this configuration file...

      So, the solution appears to be to upgrade TMUX to version 2.4 or above.

      Delete