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

18 lines
290 B
Bash
Executable File

#!/bin/sh
RED_ON="$(pgrep 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
notify-send "$(wl-paste)" "Copied to clipboard"
test -n "$RED_ON" && redshift &> /dev/null &