Skip to main content

Crate tree_space

Crate tree_space 

Source
Expand description

tree-space — a dockable, keyboard-first file manager panel for Wayland/Hyprland.

The crate is split into three layers:

  • config — TOML configuration and XDG state persistence. Pure serde code, fully unit-tested, no GTK imports.
  • fs — the non-visual file-management core:
    • fs::model — a lazy, filesystem-agnostic tree model (expand/collapse, sorting, filtering, incremental updates from change events). Directory listings are read through the fs::model::DirSource trait so tests can substitute an in-memory filesystem.
    • fs::ops — create/rename/copy/move/duplicate/trash operations behind the fs::ops::TrashService abstraction (GIO trash in production, a recording fake in tests).
    • fs::watcher — notify inotify wrapper that maps raw filesystem events onto the model’s fs::Change vocabulary.
  • ui — relm4/GTK4 components. The UI layer is intentionally thin: it renders fs::model::TreeModel and forwards user intents back into it.

Keeping the model free of GTK imports means the interesting logic can be tested headlessly with cargo test.

Modules§

audio
Inline audio playback.
cmd
Launch arguments and the IPC wire format for controlling a running panel.
config
Configuration and XDG persistence.
fs
Non-visual filesystem primitives.
ipc
Single-instance IPC for tree-space.
ui
GTK/relm4 layer: the panel window, toolbar and file tree.