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-old/scripts/.local/bin/color-picker
2019-12-12 23:45:04 -03:00

15 lines
260 B
Bash
Executable file

#!/bin/sh
set -e
RED_ON="$(pgrep redshift)" && pkill redshift
grim -g "$(slurp -b aabbcc00 -p)" - |
convert - txt:- |
grep -oE '#[0-9a-f]{6}' |
wl-copy
notify-send "$(wl-paste)" "Copied to clipboard"
[ "$RED_ON" ] && redshift &> /dev/null &