Beta v0.1.0

garbar

Async status bar daemon with native gar integration and modular architecture

garbar is the status bar component of the gardesk ecosystem. Built in Rust with async Tokio runtime, Cairo/Pango rendering, and deep integration with the gar window manager. Features include EWMH workspace tracking, multi-monitor support, XEmbed and StatusNotifierItem tray protocols, and unified configuration through gar's Lua config system. Control the bar at runtime via garbarctl CLI or Unix socket IPC.

🎯 RPM Available

Features

Installation

RPM (Fedora/RHEL)

terminal
$sudo dnf config-manager --add-repo https://repos.musicsian.com/musicsian.repo
$sudo dnf install garbar garbarctl

From Source

terminal
$git clone https://github.com/espadon/gardesk
$cd gardesk/garbar
$cargo build --release
$sudo cp target/release/garbar /usr/local/bin/
$sudo cp target/release/garbarctl /usr/local/bin/

Dependencies

garbar requires the following runtime dependencies:

  • cairo - 2D graphics library for rendering
  • pango - Text layout and rendering
  • xcb - X11 protocol bindings
  • dbus - D-Bus for StatusNotifierItem tray protocol

Automatic Startup

When using gar, garbar starts automatically via systemd user services. The gar-session.target pulls in garbar.service, ensuring the bar is available when gar's X11 session is ready.

systemd Service

# ~/.config/systemd/user/garbar.service
[Unit]
Description=garbar status bar daemon
PartOf=gar-session.target
After=gar.service

[Service]
ExecStart=/usr/bin/garbar daemon
Restart=on-failure
Environment="GAR_BAR_CONFIG=%h/.cache/gar/bar-config.json"

[Install]
WantedBy=gar-session.target

When gar starts, it activates gar-session.target, which starts garbar. When gar exits, the target deactivates and garbar stops gracefully.

Manual Startup

If running garbar standalone (without gar), start the daemon directly:

terminal
$garbar daemon
INFO Starting garbar daemon INFO Connected to X11 display INFO Found 2 monitors INFO Entering main event loop

Verbose Logging

terminal
$garbar --verbose daemon

Quick Configuration

Configure garbar directly in your gar init.lua file. When gar starts, it serializes the gar.bar table to JSON and passes it to garbar.

-- ~/.config/gar/init.lua
gar.bar = (
  height = 32,
  position = "top",
  background = "#1e1e2e",
  foreground = "#cdd6f4",

  modules_left = ( "workspaces", "window_title" ),
  modules_center = (),
  modules_right = ( "cpu", "memory", "datetime" ),

  modules = (
    workspaces = (
      show_empty = false,
      focused = (
        foreground = "#ffffff",
        underline = ( width = 2, color = "#89b4fa" ),
      ),
    ),
    datetime = (
      format = "%H:%M",
      format_alt = "%Y-%m-%d %H:%M:%S",
    ),
  ),
)

Verifying Installation

terminal
$garbarctl status
( "visible": true, "width": 1920, "height": 32, "modules_left": ["workspaces", "window_title"], "modules_center": [], "modules_right": ["cpu", "memory", "datetime"] )

File Locations

  • Config: ~/.config/gar/init.lua (via gar.bar table)
  • Cache: ~/.cache/gar/bar-config.json (serialized config)
  • PID file: $XDG_RUNTIME_DIR/garbar.pid
  • Socket: $XDG_RUNTIME_DIR/garbar.sock
  • Logs: journalctl --user -u garbar.service