Commit graph

3 commits

Author SHA1 Message Date
Breadway
5e4cbc83c9 Timeout-guard hyprctl JSON queries
hyprctl_json used a bare Command::new("hyprctl").output() with no timeout,
used by every geometry_* helper (region/output/window/active_window/
active_output selection) — an unresponsive hyprctl could block screenshot
capture indefinitely. Switched to bread_utils::proc::run_json (path
dependency for now, see the TODO in Cargo.toml).

grim/slurp/wl-copy calls deliberately left untouched: several pipe binary
image data through stdin/stdout (e.g. grim -> wl-copy), which
bread_utils::proc's current run_with_stdin only accepts as &str — adapting
those safely would need a bytes-flavored variant, out of scope for this
pass to avoid risking a regression in image piping.
2026-07-17 09:53:54 +08:00
Breadway
08c27d1b22 breadshot: expand ~ in save_dir, align Cargo.toml version with tag
- config.rs: expand a leading ~ in the save_dir config value on load.
  The documented example config (save_dir = "~/Pictures/Screenshots")
  was previously taken literally, silently creating ./~/Pictures/... in
  the current working directory. Added unit tests.
- Cargo.toml: 1.0.0 -> 0.1.0, matching the only existing tag (v0.1.0).
  breadshot --version previously reported nine releases ahead of the
  actual release history.
2026-07-17 03:19:50 +08:00
Breadway
854c5752f9 Initial commit 2026-07-02 20:59:24 +08:00