OpenRiot v7.9.20 — The One Where 1.8TB Became 1 Byte

“1.5 TB is a lot of bytes. Just one of them is not.” — The OpenRiot Crew, discovering that ParseDriveSize was splitting on the space and reading only the last character


Release Overview

v7.9.20 ships the Utilities submenu and integrates Migrate — a pure-Go backup/restore tool — into the OpenRiot ecosystem. The main Rofi launcher gets a cleanup: WiFi, Monitor, Drive Manager, Backup & Restore, Benchmark, System Monitor, and System Settings all move to Utilities, keeping the main menu clean.

Migrate itself required six surgical fixes to work on OpenBSD. The most spectacular: a 1.8 TB USB drive was detected as 1 byte because FormatBytes("1.8 TB") outputs with a space, but ParseDriveSize takes the last character as the unit. "1.8 TB" → strip space → "1.8TB" → last char = "B" → multiplier = 1 → int64(1.8 * 1) = 1 byte. You need at least 1.8 TB of total drive capacity.


Utilities Submenu

Cleanup of the main Rofi launcher. Gone: WiFi, Monitor, Drive Manager, Benchmark, System Monitor, System Settings. They now live in a @submenu:utilities:

Utilities
├── WiFi Config (openriot --nmtui)
├── Monitor Config (openriot --resolution-tui)
├── Drive Manager (openriot --disk)
├── Backup & Restore (migrate)
├── Drive Benchmark (openriot --disk)
├── System Monitor (btop)
└── System Settings (xfce4-settings-manager)

OpenRiot Settings stays in the main menu where it belongs.

Each utility gets a for_window floating rule in i3 and an icon in icons.toml for Polybar workspace labels. openriot_migrate uses the archive icon 󰆼 because nothing says “system backup” like a zipped box.


Migrate OpenBSD Fixes

The backup/restore tool needed six fixes to run on OpenBSD:

Issue Root cause Fix
Build failure Brace structure mangled Rewrote if block
  in ui.go  
Build failure Missing imports Added drives and platform
    packages to ui.go
LUKS warning Rendered on OpenBSD runtime.GOOS != "openbsd"
  where LUKS doesn’t exist guard
1 byte drive FormatBytes outputs Strip spaces, extract trailing
  "1.5 TB" but alphas as unit (not last char),
  ParseDriveSize reads take first char for multi-letter
  last char as unit ("B") units ("TB""T")
Slow backup .cargo, .rustup, Added to GetHomeBackupExclusions
  .npm, .go/pkg/mod, — all rebuildable with cargo,
  .cabal, .stack, rustup, npm, go install
  .m2 have tons of  
  rebuildable files  
No progress info Spinner with no ETA Added Elapsed/ETA to
    ProgressUpdate, renders in
    renderProgress() as
    `“Total Time: 00:02:34
    Estimated Completion: 00:01:23”`

🧾 Files Changed

File Change
config/rofi/utilities.txt NEW — Utilities submenu
config/rofi/apps.txt Removed utility entries, added
  @submenu:utilities, kept
  OpenRiot Settings in main menu
config/window/icons.toml Added openriot_migrate, btop
config/i3/config openriot_migrate for_window rule
config/bin/migrate NEW — Migrate binary (built from
  ~/Code/Migrate)
~/Code/Migrate/internal/ui.go Fixed brace structure, missing
  imports, LUKS runtime guard,
  timer/ETA rendering, timerStyle
~/Code/Migrate/internal/space.go ParseDriveSize: strip spaces,
  trailing alpha extraction,
  multi-letter unit prefix
~/Code/Migrate/internal/utils.go Added rebuildable dir exclusions
  to GetHomeBackupExclusions
~/Code/Migrate/internal/operations.go ProgressUpdate: Elapsed/ETA
  fields. calculateRealProgress:
  compute elapsed + ETA.
~/Code/Migrate/internal/model.go backupElapsed, backupETA fields,
  stored from ProgressUpdate

🗣️ Final Words

“1.8 TB. One tiny space. One teeny ‘B’. And suddenly your backup drive is smaller than a floppy.” — The OpenRiot Crew, on the difference between “1.8 TB” and “1 B”