This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/scripts/color-picker
2021-12-10 20:23:33 -03:00

18 lines
295 B
Bash
Executable file

#!/bin/bash
RED_ON="$(pidof redshift)"
if test -n "$RED_ON";then
pkill redshift
fi
grim -g "$(slurp -b aabbcc00 -p)" - |
convert - txt:- |
grep -oE '#[0-9A-Fa-f]{6}' |
wl-copy -n
notify-send "$(wl-paste)" "Copied to clipboard"
test -n "$RED_ON" && redshift &> /dev/null &