~tardypad/dotfiles

ref: 00c0c349a1b8960152233f11caa9ea1a40e395a3 dotfiles/files/scripts/shell/color-picker -rwxr-xr-x 229 bytes
00c0c349 — Damien Tardy-Panis Add presentation mode to mako to hide notifications 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
#!/bin/sh

PIXEL_REGION=$( slurp -p 2> /dev/null )

[ -z "${PIXEL_REGION}" ] && exit 1

grim -g "${PIXEL_REGION}" -t ppm - \
  | magick - -format '%[pixel:p{0,0}]' txt:- \
  | sed -n 's/0,0.* (\([^ ]*\)) *\(#[^ ]*\) .*/\2\n\1/p'