diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-10 12:32:48 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-10 12:41:25 +0100 |
| commit | 63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch) | |
| tree | 41cd5d2d1ec36e74e464caab722cc9b460153f04 /bin/colorpick | |
| parent | 5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff) | |
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bin/colorpick')
| -rwxr-xr-x | bin/colorpick | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/bin/colorpick b/bin/colorpick deleted file mode 100755 index 8561129..0000000 --- a/bin/colorpick +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -set -e -[ -n "$DEBUG" ] && set -x - -# check requirements -for tool in convert grim slurp wl-copy; do - if ! command -v "$tool" >/dev/null; then - printf "%s: %s not installed but required\n" "$(basename "$0")" "$tool" >&2 - exit 1 - fi -done - -# src: https://git.sr.ht/~sircmpwn/dotfiles/tree/f9e7e88a72c2b87e5ab823205cb3a3aa8f3babd0/bin/colorpick - -notify-send "pick a color" - -color=$(grim -g "$(slurp -p -b 00000000)" - | convert - txt:- | awk 'END{print $3}') -icn=$(mktemp).png -trap '{ rm $icn; }' EXIT -convert -size '30x30' xc:white -fill "$color" -draw "rectangle 0,0 30,30" "$icn" -wl-copy "$color" - -notify-send -i "$icn" "color copied to clipboard" "$color" |