#dwm #status-bar #status #bar

app stringbar

A dwm-style status bar configured in RON

3 unstable releases

0.2.0 May 7, 2024
0.1.0 May 7, 2024

#1100 in Command line utilities

45 downloads per month

GPL-3.0-or-later

24KB
271 lines

stringbar

Crates.io Version GitHub Actions Workflow Status GitHub License

A dwm-style status bar (sets X root window name).

Features

  • Configurable layout
  • Hot config reloading

Runtime Dependencies

  • xsetroot

Installation

Using cargo

Execute cargo install stringbar

From source (x86_64 Linux only)

Build Dependencies

Building

Execute just release and copy the resulting ./stringbar binary to a directory in $PATH.

Configuration

  • Start stringbar once to generate the default configuration file.
  • Edit $XDG_CONFIG_HOME/stringbar/config.ron

Available modules

Name Description
CpuUsage Cpu utilization in percent
MemoryUsage Memory usage out of total
SwapUsage Swap usage out of total
Timestamp A custom formatted timestamp
ProcessCount Number of processes running
DiskUsage Amount of space used out of total on a specific disk
DiskUsageTotal Total amount of space used out of total on all storage devices

Example

#![enable(implicit_some)]
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
    separator: " | ",
    update_interval_ms: 1000,
    decimal_data_units: false,
    sections: [
        (
            module: MemoryUsage,
            decoration: (
                before: "dram ",
                after: None,
            ),
        ),
        (
            module: DiskUsage(
                name: "/dev/sda",
            ),
            decoration: (
                before: "sda ",
                after: None,
            ),
        ),
        (
            module: DiskUsageTotal(
                include_removables: false,
            ),
            decoration: (
                before: "total ",
                after: None,
            ),
        ),
        (
            module: Timestamp(
                template: "%d/%m/%Y %H:%M",
            ),
            decoration: (
                before: None,
                after: None,
            ),
        ),
    ],
)

Dependencies

~4–31MB
~463K SLoC