aboutsummaryrefslogtreecommitdiff
path: root/scripts/dot-local/bin/colorpick
blob: 6159387cfd5713db4bbc03ad93b495662351393c (plain)
1
2
3
4
5
6
#!/bin/sh
color=$(grim -g "$(slurp -p -b00000000)" -t ppm - | magick convert - -format '%[pixel:p{0,0}]' txt:- | tail -n 1 | awk '{print $3}')
if [ -n "$color" ]; then
    notify-send "ColorPick" "$color"
    wl-copy "$color"
fi