# fluxSystemInfo

A Window Maker style system-info dockapp for the Fluxbox slit. The tile shows
uptime, RAM usage, and one or two disks' usage; the left-click popup expands to
hostname, kernel, window manager / desktop, RAM + swap, every configured mount
point, the process count, and the top processes by memory or CPU.

Part of the [Flux Dock Apps Suite](https://www.chrisspackman.com/software/flux-dock-apps/).

## Screenshot

```
┌──────────────┐
│ UP    5d 22h │  ← uptime
│ RAM      20% │
│ [██░░░░░░░░] │  ← RAM usage bar
│ Home     53% │  ← the tile disk's mount ($HOME shows as "Home")
│ [█████░░░░░] │  ← disk usage bar (turns amber >75%, red >90%)
└──────────────┘
```

A second mount can share the tile (`tile_disk = /, /home`); the rows
compress to fit its extra bar.

## Installation

Requires Rust and a working X11 environment.

```sh
cargo build --release
cp target/release/fluxSystemInfo ~/.local/bin/
```

The release build is stripped and LTO-optimized. No runtime dependencies beyond
libc and libX11.

## Usage

```
fluxSystemInfo [OPTIONS]
```

Add `fluxSystemInfo` to your Fluxbox startup to embed it in the slit.

Key options:

- `--disk PATH[,PATH]` — the mount (or two) whose usage bars show on the tile
  (default `/`). The user's `$HOME` is labeled `Home`.
- `--interval SECONDS` — refresh interval (default 5).
- `--size 64|96|128`, `--font PATH`, `--theme zenburn`, `--background`.
- `--write-config` / `--configure` to create a config file.
- `--config PATH` to load an alternate config file.

## Configuration

Config lives at `${XDG_CONFIG_HOME:-~/.config}/fluxSystemInfo/config`
(`key = value`, `#` comments). Notable keys:

- `tile_disk = /, /home` — the mount(s) shown on the tile, max 2 (same as
  `--disk`).
- `popup_disks = /, /home/storage, /home/movies` — a separate, comma-separated
  list of mounts shown only in the popup.
- `process_sort = memory` — rank the popup's top-process list by `memory` or
  `cpu`.
- `process_count = 10` — how many processes the popup lists.

Run `fluxSystemInfo --write-config` to drop an annotated config with every
option, or see `man fluxSystemInfo`.

## Data sources

Everything comes from the kernel: `/proc/uptime`, `/proc/meminfo`,
`/proc/stat`, `/proc/<pid>/{statm,stat,comm}`, `statvfs()` for disk free space,
and EWMH (`_NET_SUPPORTING_WM_CHECK` → `_NET_WM_NAME`) for the window-manager
name. Linux only.

## License

[CC0 1.0](LICENSE) — Public Domain
