scripts/clip-color/clip-color.sh
2021-08-29 22:15:26 -03:00

15 lines
281 B
Bash
Executable File

#!/bin/sh
killall colorpicker > /dev/null
notify() {
if [ "$(command -v notify-send)" ]; then
notify-send "$@"
fi
}
COLOR="$(colorpicker --short --one-shot --preview)"
printf "%s" "$COLOR" | xclip -selection clipboard
notify "clip-color" "Color $COLOR copied!"