FreeBSD Desktop – Part 5 – Key Components – Status Bar

In the Part 5 of the FreeBSD Desktop series I would like to describe key components of self made custom desktop environment such as:

  • Window Manager
  • Status Bar
  • Task Bar
  • Wallpaper Handling
  • Application Launcher
  • Keyboard/Mouse Shortcuts
  • Locking Solution
  • Blue Light Spectrum Suppress

Today we will focus on the second part – the Status Bar. In the next series each of these components configuration would also be described along with eventual needed scripts.

You may also check earlier/other articles of the FreeBSD Desktop series:

Status Bar

Also known as information bar, the place on the screen that would provide You needed information such as current date and time, CPU, RAM and storage usage, current network information or battery status. Such function can be done by dozens of open source solutions, but we will limit ourselves only to fast and low on resources ones. The list of potential solutions contains:

  • Conky
  • Dzen2
  • Xmobar
  • Polybar

Having tested all of them the Dzen2 and Conky seems to be the best solutions but I finally settled with Dzen2 for a various reasons that I will describe in a moment. While Xmobar is nice solution it comes with about 2 GB of dependencies of Haskell and Haskell libraries, keeping those on disk just to run ‘tiny’ status bar does not seem sensible not ‘light’.

Here is example of Xmobar in action.

openbox-xmobar-small.jpg

While Polybar can look very nice on screenshots it is a lot more heavy on resources and is limited only to modules/features that were implemented in it.

Here is some more advanced Polybar setup.

openbox-polybar.png

Also the Polybar uses almost three times more RAM then Dzen2 and will use similarly more CPU time.

USER       PID  %CPU %MEM     VSZ    RSS TT  STAT STARTED       TIME COMMAND
vermaden 27560   0.0  0.2   41056  20544  8  S+   11:17      0:00.21 polybar
vermaden 10522   2.4  0.1   12876   8192  -  S    11:21      0:00.07 dzen2

This left us with Conky and Dzen2. I have used Conky for quite long time but after recent tests I made Dzen2 is a lot less on resources then Conky while doing the same thing. The other even more important measure is battery time on a laptop. With same interval, exactly same look output and using same external scripts the laptop would run 5:19 using Conky but it will run 5:43 when running Dzen2. Almost 25 minutes more of battery time with same features is enough for me to switch to Dzen2.

  PID USERNAME      THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
85291 vermaden        3  52    0 53484K  7500K select  2   2:52   0.29% conky
85289 vermaden        1  20    0 47452K  7524K select  3   0:41   0.00% dzen2

Of course if You want to plot gauges for CPU or RAM or possibly bars for filesystems usage then only Conky provides such features, but if You use text to present information, then Dzen2 provides similar features with lower footprint.

Example Conky setup.

openbox-conky-small.png

The Dzen2 also offers feature that Conky does not offer. If you would like to implement refresh interval of 30 seconds for example (not so often) and also refresh that information everytime you ‘click’ on the status bar (or by other action) its possible to implement in Dzen2 using mkfifo(1) command. Its not possible to achieve with Conky. Why anyone would want to implement such ‘strange’ refresh policy? To get more battery life as often You do not need this information to be one only at most one second behind reality (refresh every second) and if You need it you refresh it manually and have the needed information. The other reason is ‘focus’. If this status bar refreshes every second, then it ‘caches’ your attention, this may prevent you from focusing deep enough on the task you are currently doing. If you do something important that requires focus then You do not want status bar (or anything else) to distract you with useless at the moment information.

Now Dzen2 configured similarly to Conky and Xmobar.

openbox-dzen2-small.png

EOF
Advertisements

16 thoughts on “FreeBSD Desktop – Part 5 – Key Components – Status Bar

  1. Pingback: FreeBSD desktop (5) | 0ddn1x: tricks with *nix

  2. Pingback: FreeBSD Desktop – Part 6 – Key Components – Task Bar | vermaden

  3. Pingback: FreeBSD Desktop – Part 7 – Key Components – Wallpaper Handling | vermaden

  4. Pingback: FreeBSD Desktop – Part 8 – Key Components – Application Launcher | vermaden

  5. Pingback: FreeBSD Desktop – Part 9 – Key Components – Keyboard/Mouse Shortcuts | vermaden

  6. Pingback: FreeBSD Desktop – Part 10 – Key Components – Locking Solution | vermaden

  7. Pingback: FreeBSD Desktop – Part 11 – Key Components – Blue Light Spectrum Suppress | vermaden

  8. Pingback: FreeBSD Desktop – Part 12 – Configuration – Openbox | vermaden

  9. Pingback: FreeBSD Desktop – Part 13 – Configuration – Dzen2 | vermaden

  10. Pingback: FreeBSD Desktop – Part 14 – Configuration – Tint2 | vermaden

  11. Pingback: FreeBSD Desktop – Part 3 – X11 Window System | vermaden

  12. Pingback: FreeBSD Desktop – Part 15 – Configuration – Fonts & Frameworks | vermaden

  13. Pingback: FreeBSD Desktop – Part 1 – Simplified Boot | vermaden

  14. Pingback: FreeBSD Desktop – Part 2 – Install | vermaden

  15. Pingback: FreeBSD Desktop – Part 4 – Key Components – Window Manager | vermaden

  16. Pingback: FreeBSD Desktop – Part 16 – Configuration – Pause Any Application | vermaden

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s