Migrate to bread-utils: Hyprland IPC, single-instance lock, popup scaffold

Replaces three hand-rolled pieces of code with the new shared bread-utils
crate (path dependency for now, see the TODO in breadbox/Cargo.toml):

- get_active_workspace's raw socket1 client -> bread_utils::hypr
- toggle_or_continue's TOCTOU-prone PID-file dance -> bread_utils::singleton
  (flock-based, no read-then-write race)
- the layer-shell window setup, Up/Down visible-row navigation, and
  click-outside-close gesture -> bread_utils::gtk_popup

Builds and tests clean across the whole breadbox workspace.
This commit is contained in:
Breadway 2026-07-17 09:20:06 +08:00
parent a6bba2c362
commit 50e5a63528
3 changed files with 31 additions and 113 deletions

12
Cargo.lock generated
View file

@ -37,11 +37,23 @@ dependencies = [
"serde_json",
]
[[package]]
name = "bread-utils"
version = "0.2.3"
dependencies = [
"dirs",
"gtk4",
"gtk4-layer-shell",
"serde",
"serde_json",
]
[[package]]
name = "breadbox"
version = "0.2.7"
dependencies = [
"bread-theme",
"bread-utils",
"breadbox-shared",
"gtk4",
"gtk4-layer-shell",