gold-bar is a solid “minimalistic” status bar text generator written in golang.

  • Default text output:
 Mute Head 20% | WiFi | Discharging 43% | Fri 20 May 2022-W20 14:40:39 
  • With colors and icons enabled:

Advantages

  • Efficient design with modular independent blocks.
  • No configuration file, all settings through command line flags.
  • Icon support in different common font types.
  • Color support in different formats and themes.
  • Setting xsetroot directly instead of printing to standard out.
  • It’s no problem if you for example don’t have a wifi card. That block will just display an indicator that it’s empty.
  • Attention to detail like:
    • Volume block shows active port (headphones/speakers) and updates immediately upon unplugging/plugging in.
    • Battery block changes its color and icon when there is little power left.
    • Showing week number.
    • Mute status for audio.
    • Disabled/disconnected differentiation in wifi block.

Usage

Usage of gold-bar:
  -color
        enable color
  -colorformat string
        values: [lemonbar status2d] (default "status2d")
  -colortheme string
        values: [nord dracula catppuccin gruvbox light] (default "nord")
  -icons string
        values: [text nerd awesome emoji vaportext] (default "text")
  -rootname
        set xsetroot instead of printing to standard out (for dwm)

Lemonbar usage example

  • gold-bar -icons nerd -color -colorformat lemonbar -colortheme catppuccin | lemonbar -p -f "Ubuntu Mono" -f "Symbols Nerd Font" -B "#1E1E28"

dwm usage example

  • With dwm you need to use the -rootname flag option.
  • gold-bar -icons nerd -color -colorformat status2d -rootname
  • NOTE: patch status2d needs to be installed for color support.

Autostarting the program

  • Add the gold-bar command (with your preffered flags) to .xinitrc or another similar type of file.
  • Don’t forget to put a & at the end to ensure it runs in the backround and does not halt your system startup.
  • Example: gold-bar -rootname &

Make it stop running

  • pkill -x "gold-bar"

Installation

Note: gold-bar relies on the go package “pulseaudio” written by mafik

  • github.com/mafik/pulseaudio

Note: pulse audio needs to be installed for audio block to work

Install process

  1. git clone https://github.com/simtd/gold-bar.git
  2. cd gold-bar
  3. sudo make install

Uninstall process

  1. sudo make uninstall

TODO

Not implemented yet

  • Block showing backlight level (event based).

Improvements

  • Skip some pulse audio events in volume.go.
  • Replace fmt call in main loop with something more efficient.
  • Battery block should work with multiple batteries.

Wishlist

  • Currently all block except audio are updating on a set timer. Move them over to event based instead.
  • Remove external dependencies.
  • Option to show wifi name.
  • A few more blocks would be nice.

GitHub

View Github