scicalculator
scicalculator

Reputation: 1518

Adding informative statusbar to fullscreen terminal window

Briefly: I would love to add a status bar that sticks to either the bottom or top of my terminal window that provides glancible information (e.g. battery life, signal strength, email count, $PROMT_COMMAND, etc.). Essentially, this will allow the terminal to be opened up to fullscreen and have all the information I could possibly want easily glancible while letting me continue all of my necessary terminal work as normal. I use a mac primarily, but would prefer a *nix compatible solution.

More detail (and what I already tried): I am a big terminal user and only recently (within a day or two) started using tmux, so I understand that many of you may suggest that I try to use a multiplexer like screen or tmux. While tmux is starting to get very useful to me, it has it's limitations such as a limit to a single-row status bar, which is not ideal since I would want to keep the tab's bar clean without half of it being eaten up by information. Also, I would want to add $PROMPT_COMMAND which displays the current directory, and that could easily eat up most of the status bar depending on where I am in the system.

Also, I tried screen for a bit, which let's you have a hardstatus and a caption which is close to what I want, but it's development seems to have halted. Furthermore, the patch for vertical split panes messes up the graphics of a two-row status bar (very ugly).

Therefore, I think it would be preferable to have a background process running that updates a status bar on part of the screen above my multiplexer ... unless of course tmux has a multi-row status bar implementation that I haven't figured out yet.

I would love to hear about any of your possible solutions, or even your own personal setups if you think it works well for you. Thank you all for any possible help.

Upvotes: 1

Views: 1733

Answers (2)

richo
richo

Reputation: 8999

I have battery info in mine,

You can get copies of the files you'll need at

https://github.com/richo/dotfiles/blob/master/tmux.conf and https://github.com/richo/dotfiles/blob/master/bin/battery

(Make sure that battery is executable and in your PATH)

It'll show you battery percentage in blue (charging), red (discharging) or not at all (fully charged)

Upvotes: 0

Nicholas Riley
Nicholas Riley

Reputation: 44331

A couple of options:

  1. You could run tmux inside tmux (with different configurations; you can use -f to specify a configuration file.)

  2. You could use the tab title, though that's probably not wide enough to include everything you want. (Even if there's only one tab, you can show the tab bar in fullscreen mode). You need to tell tmux to pass the title through; see set set-titles and set set-titles-string.

I'd suggest you use both - put the current directory in the tab title and all the other status info in a separate line maintained by tmux, that way you can just skip the second part when you're not using a full-screen terminal.

Upvotes: 1

Related Questions