Skip to content

Removable Storage

The gnarus-storage package ships a Rust program that watches removable storage over UDisks2 (D-Bus, zero polling) and feeds a compact Waybar module.

The module comes pre-configured in the recording/microphone/audio group. The bar shows a single Font Awesome icon when removable devices exist; when no device is present the module hides. The Waybar tray is reserved for apps that publish tray icons, such as Telegram and Steam.

Button Action
Left Choose a device and open it in the file manager
Right Context menu (Open/Mount/Unmount/Eject/Power Off/Unlock/Lock/Copy)
Terminal window
gnarus-storage once # print one JSON line and exit
gnarus-storage list # list removable volumes
gnarus-storage devices # choose a device and open it in the file manager
gnarus-storage menu # context menu (rofi/wofi/dmenu)
gnarus-storage unmount # actions: open mount unmount eject poweroff lock unlock copy

Defaults live in /etc/gnarus-storage/config.json and /etc/gnarus-storage/theme.css. To customize per user, copy them to ~/.config/gnarus-storage/. Options: show_name, show_capacity, hide_when_empty, show_hidden, max_devices, sort (mount_time | insertion | name | size), separator, format, tooltip_format, file_manager_command, open_command (compatibility alias), copy_command, unlock_command, menu (rofi | wofi | dmenu), menu_flags and icons.

For LUKS volumes, unlock_command (default kitty -e) opens a terminal for the passphrase. Runtime dependencies: udisks2, glib2, rofi/wofi/dmenu, wl-clipboard and libnotify.

The system package owns:

/etc/gnarus-storage/theme.css
/etc/gnarus-storage/themes/gnarus-dark.css
/etc/gnarus-storage/themes/gnarus-dark-silver.css
/etc/gnarus-storage/themes/gnarus-light.css
/etc/gnarus-storage/themes/gnarus-slate.css

The GNARUS environment synchronizes ~/.config/gnarus-storage/theme.css when the user changes the desktop theme, so the GTK popup follows the active GNARUS theme family. User theme files take precedence over system defaults.

The Waybar module is configured in gnarus as custom/storage:

{
"exec": "gnarus-storage watch",
"return-type": "json",
"format": "{}",
"tooltip": true,
"hide-empty-text": true,
"on-click": "/usr/share/gnarus/hypr/scripts/storage-menu.sh"
}

storage-menu.sh anchors the GTK menu to the pointer position when possible. The gnarus package depends on gnarus-storage, but the storage package owns its binary, config, themes and license.