🐛 fix(hypr): hyprpicker script now detects if the picker is escaped without selecting anything

This commit is contained in:
Sergio Laín 2024-07-25 18:57:01 +02:00
parent 341c78ff12
commit 583e1ff6e0
No known key found for this signature in database
GPG key ID: 8429B2EE312F8150

View file

@ -2,15 +2,13 @@
# Simple Script To Pick Color Quickly.
# pick and autocopy
hyprpicker -a
# pick, autocopy and get the value
color=$(hyprpicker -a)
# get the value
color=$(wl-paste)
image=/tmp/${color}.png
echo "$color"
if [[ "$color" ]]; then
image=/tmp/${color}.png
# generate preview
convert -size 48x48 xc:"$color" "$image"
# notify the color