From 26e393b65d10d2d8aff915145b07e7a5a9a5e94c Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Sun, 5 Jul 2026 15:54:30 +0100 Subject: [PATCH] =?UTF-8?q?feat(menu):=20hyprpicker=20color=20picker=20?= =?UTF-8?q?=E2=80=94=20Tools=20=E2=80=BA=20row=20+=20SUPER+CTRL+P=20(item?= =?UTF-8?q?=2013=20done)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The last niceties slice: pick a pixel's color into the clipboard. hyprpicker joins grim/slurp in systemPackages; a new nomarchy-menu `colorpicker` mode captures its output, wl-copies it, and toasts the hex (Esc = silent cancel). Tools › row self-gates on hyprpicker being present; SUPER+CTRL+P added in keybinds.nix, so the Hyprland bind and the SUPER+? cheatsheet row come from the one source. Item 13 complete and deleted from BACKLOG. Verified: V0 (flake check); V1 — template-home and template-system build; rendered nomarchy-menu passes bash -n and contains the mode + gated row; cheatsheet has the SUPER+CTRL+P row; hyprland.conf has the bind; the system toplevel ships sw/bin/hyprpicker. Remains: V3 — real loupe → click → wl-paste round-trip in a session (HARDWARE-QUEUE). Co-Authored-By: Claude Fable 5 --- agent/BACKLOG.md | 7 ------- agent/HARDWARE-QUEUE.md | 4 ++++ agent/JOURNAL.md | 16 ++++++++++++++++ modules/home/keybinds.nix | 1 + modules/home/rofi.nix | 15 ++++++++++++++- modules/nixos/default.nix | 1 + 6 files changed, 36 insertions(+), 8 deletions(-) diff --git a/agent/BACKLOG.md b/agent/BACKLOG.md index 330dc03..867b01c 100644 --- a/agent/BACKLOG.md +++ b/agent/BACKLOG.md @@ -26,13 +26,6 @@ next, in what order*. ## NEXT -### 13. Small niceties batch (one slice per iteration) -Each is a small, self-contained polish item in the existing patterns -(shipped: idle-inhibit/caffeine 2026-07-04; low-battery notifications -2026-07-05 — sysfs watcher + checks.battery-notify): -- **Color picker:** `hyprpicker` → clipboard as a Tools › entry + - `SUPER+CTRL` bind; pairs naturally with theme work. - ### 14. Automated upstream lock bumps (maintainer CI, slices b+c) `[big]` ROADMAP § Automated upstream lock bumps — the scheduled half (the checks-on-push workflow shipped; see item 20 for the runner status): diff --git a/agent/HARDWARE-QUEUE.md b/agent/HARDWARE-QUEUE.md index 76c2178..a99369b 100644 --- a/agent/HARDWARE-QUEUE.md +++ b/agent/HARDWARE-QUEUE.md @@ -140,6 +140,10 @@ QA machine), the **T14s** (webcam case). now reflects the real state (the `= true` comparison fix). — 2026-07-04 Bernardo: PASS — theme changes committed and the toggle self-committed. +- [ ] **Color picker (item 13, final slice)** — SUPER+CTRL+P (or Tools › + Color picker): hyprpicker's zoom loupe appears; click a pixel → + toast shows the hex and `wl-paste` yields it; Esc cancels with no + toast. Row present in the SUPER+? cheatsheet. - [ ] **Low-battery toasts (item 13 slice)** — on battery, drain past 25%: one "Battery low" toast; past 10%: a critical "Battery critical" toast that stays up until dismissed (swaync); plug in, diff --git a/agent/JOURNAL.md b/agent/JOURNAL.md index c40146e..c79d222 100644 --- a/agent/JOURNAL.md +++ b/agent/JOURNAL.md @@ -17,6 +17,22 @@ Template: --- +## 2026-07-05 — color picker (iteration #25, item 13 final slice → item done) +- **Task:** BACKLOG NEXT#13 last slice — hyprpicker → clipboard from + the menu + a direct bind. Item 13 complete; deleted from BACKLOG. +- **Did:** hyprpicker into systemPackages (next to grim/slurp); rofi.nix + `colorpicker` mode (hyprpicker → wl-copy → hex-in-toast, Esc = silent + cancel) + self-gated Tools › "Color picker" row + usage line; + keybinds.nix SUPER+CTRL+P row (feeds bind + cheatsheet). +- **Verified:** V0; V1 — template-home AND template-system build; + rendered nomarchy-menu bash -n OK with mode + gated row; cheatsheet + txt has the SUPER+CTRL+P row; hyprland conf has the bind; system + toplevel ships sw/bin/hyprpicker. Picking needs a compositor → V3. +- **Pending:** V3 queued (loupe → click → wl-paste round-trip). +- **Next suggestion:** #15 (display profiles) needs a design pass + written into the entry first; #16 (greeter theming) is the next + directly codeable item — or #14's bump workflow (eval-tier gate). + ## 2026-07-05 — low-battery notifications (iteration #24, item 13 slice) - **Task:** BACKLOG NEXT#13 second slice — the bar colors the battery at 25/10% but nothing *notified*. diff --git a/modules/home/keybinds.nix b/modules/home/keybinds.nix index f0ef4d7..1eed5cb 100644 --- a/modules/home/keybinds.nix +++ b/modules/home/keybinds.nix @@ -49,6 +49,7 @@ { mods = "$mod CTRL"; key = "N"; action = "exec, nomarchy-menu network"; desc = "Network (nmtui)"; } { mods = "$mod CTRL"; key = "B"; action = "exec, nomarchy-menu bluetooth"; desc = "Bluetooth"; } { mods = "$mod CTRL"; key = "S"; action = "exec, nomarchy-menu capture"; desc = "Screenshot / capture"; } + { mods = "$mod CTRL"; key = "P"; action = "exec, nomarchy-menu colorpicker"; desc = "Color picker (→ clipboard)"; } { mods = "$mod CTRL"; key = "A"; action = "exec, nomarchy-menu ask"; desc = "Ask Claude"; } { mods = "$mod CTRL"; key = "D"; action = "exec, nomarchy-menu dnd"; desc = "Do Not Disturb toggle"; } diff --git a/modules/home/rofi.nix b/modules/home/rofi.nix index a82f458..bb592df 100644 --- a/modules/home/rofi.nix +++ b/modules/home/rofi.nix @@ -377,6 +377,17 @@ ${themeRows} *"Record screen"*) exec nomarchy-record start screen ;; esac ;; + colorpicker) + # Pick a pixel's color (hyprpicker's zoom loupe) → clipboard, hex + # in the confirmation toast. Esc/cancel exits silently. Self-gated + # in the Tools row; guarded here too for direct invocation. + command -v hyprpicker >/dev/null 2>&1 \ + || { notify-send "Color picker" "hyprpicker is not installed."; exit 0; } + color=$(hyprpicker) || exit 0 + [ -n "$color" ] || exit 0 + printf '%s' "$color" | wl-copy + notify-send "Color picker" "$color copied to the clipboard." ;; + keybinds) # Read-only cheatsheet, generated from keybinds.nix at build time. # Enter on a row is a deliberate no-op (nothing to launch); ↩ Back @@ -507,6 +518,7 @@ ${themeRows} row "Files" system-file-manager row "Web search" system-search row "Capture" applets-screenshooter + command -v hyprpicker >/dev/null 2>&1 && row "Color picker" preferences-desktop-color row "Ask Claude" internet-chat back } | rofi -dmenu -show-icons -p Tools) || exit 0 @@ -518,6 +530,7 @@ ${themeRows} *Files*) exec "$0" files ;; *Web*) exec "$0" web ;; *Capture*) exec "$0" capture ;; + *Color*) exec "$0" colorpicker ;; *Ask*) exec "$0" ask ;; esac ;; @@ -597,7 +610,7 @@ ${themeRows} esac ;; *) - echo "usage: nomarchy-menu [tools|system|power|power-profile|theme|clipboard|calc|files|emoji|web|network|bluetooth|audio|display|printers|capture|keybinds|ask|dnd|nightlight|autotimezone|autocommit|vpn|snapshot]" >&2 + echo "usage: nomarchy-menu [tools|system|power|power-profile|theme|clipboard|calc|files|emoji|web|network|bluetooth|audio|display|printers|capture|colorpicker|keybinds|ask|dnd|nightlight|autotimezone|autocommit|vpn|snapshot]" >&2 exit 64 ;; esac ''; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 41b729c..4c29f0a 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -367,6 +367,7 @@ in wl-clipboard grim slurp + hyprpicker ] ++ lib.optional (cfg.snapper.enable && (config.fileSystems."/".fsType or "") == "btrfs") # Snapshot, then rebuild — rollback material for system changes # (theme changes don't need it; HM generations already roll back).