scripts/clip-color/clip-color.sh
Guilherme Rugai Freire 43b7773876
add clip-color script
2021-08-28 17:24:09 -03:00

13 lines
248 B
Bash
Executable File

#!/bin/sh
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!"