feat(menu): hyprpicker color picker — Tools › row + SUPER+CTRL+P (item 13 done)
All checks were successful
Check / eval (push) Successful in 3m0s
All checks were successful
Check / eval (push) Successful in 3m0s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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"; }
|
||||
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user