DEV Community

0 seconds of 0 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
00:00
 
Waylon Walker
Waylon Walker

Posted on • Edited on • Originally published at waylonwalker.com

5 1

clean up tmux status-bar

The tmux status bar can be a handy tool to remind yourself where you are within tmux. It can also include a bunch of system information like battery status, cpu, mem, whatever you can get from the command line. Honestly I like to keep
it minimal, and actually keep it turned off most of the time. I find that it helps a little bit for others to follow along if I keep it on in certain circumstances.

show the status bar

You can set a hotkey to show or hide the status bar.


 bash
bind s set-option -g status
bind C-s set-option -g status


Enter fullscreen mode Exit fullscreen mode

setting the background transparent

I really want a minimal status bar with very little bling, I want it to get out of the way an not draw too much attention, so step one is to set the background to transparent.


 bash
# default statusbar colors
#――――――――――――――――――――――――――――――――
set-option -g status-bg default
set-option -g status-fg colour240


Enter fullscreen mode Exit fullscreen mode

setting default colors

I want my status bar to somewhat match the rest of my theme, so I set the default foreground as magenta and the default background as transparent.


 bash
# default window title colors
#―――――――――――――――――――――――――――――――
set-window-option -g window-status-style fg=magenta
set-window-option -g window-status-style bg=default


Enter fullscreen mode Exit fullscreen mode

my status bar

Honestly I set this up quite awhile ago, and it does everything I need it to for now. It shows me the current session that I am in on the left and lists out the windows for the session in the middle.


 bash
set -g status-left-length 85
set -g status-left "working on#[fg=colour135] #S"
set -g window-status-current-format "#[fg=black,bold bg=default]│#[fg=white bg=cyan]#W#[fg=black,bold bg=default]│"
set -g window-status-current-format "#[fg=black,bold bg=default]│#[fg=colour135 bg=black]#W#[fg=black,bold bg=default]│"
set -g status-style bg=default
set -g status-right "#[fg=magenta] #[bg=gray] %b %d %Y %l:%M %p"
set -g status-right '#(gitmux "#{pane_current_path}")' 
set -g status-justify centre


Enter fullscreen mode Exit fullscreen mode

For more format options search for FORMATS in the tmux manpage.

Be sure to check out the full YouTube playlist and subscribe if you like it.

tmux playlist on youtub

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay