A lightweight, extensible status bar for X11 window managers that updates the root window name (compatible with WMs like dwm, xmonad and bspwm).
- Fully configurable in Go: define your own components and layouts using Go code.
- Template-based output: format component output using Go's text/template syntax.
- Built-in system components: includes ready-to-use modules like battery status, date/time, and more.
- Concurrent design: each component runs in its own goroutine for efficient and responsive updates.
- Minimal dependencies: no external configuration format required.
- Go 1.23+ (
cgois required for the Xlib bindings) - X11 environment with a compatible window manager
- (Optional) A Nerd Font for icons
git clone git@github.com:reyniersbram/go-statusbar.git
cd go-statusbar
go installAfter installation, the go-statusbar binary will be available in your
$GOPATH/bin or $HOME/go/bin directory.
Add the following line to your .xinitrc or window manager autostart script::
go-statusbar &This will start go-statusbar in the background and continuously update your
X11 root window title with the status bar output.
coming soon...
go-statusbar ships with several built-in components, including:
- Battery: monitors capacity and charging status via
/sys/class/power_supply/ - DateTime: displays the current date and time
- (More components coming soon)
- (More components can easily be added by implementing the
Componentinterface)
Each component's output can be customized via Go templates, allowing for rich, dynamic formatting.
- Simplicity: small, simple, dependency-free, easy to hack
- Extensibility: users can define their own components, templates, and template functions.
- Performance: non-blocking design using goroutines for each component ensures responsive updates.
This project is inspired by dwmstatus, a
minimalist status bar written in C.
go-statusbar provides a similar lightweight design, but in pure Go, making it
an easier starting point for developers who are comfortable with Go but are not
that familiar with C.
By leveraging goroutines, it also avoids blocking and freezing issues that can
occur when components take a long time to refresh their data.