🐛 fix(hypr): hyprpicker script now detects if the picker is escaped without selecting anything
This commit is contained in:
parent
341c78ff12
commit
583e1ff6e0
1 changed files with 8 additions and 10 deletions
|
@ -2,17 +2,15 @@
|
||||||
|
|
||||||
# Simple Script To Pick Color Quickly.
|
# Simple Script To Pick Color Quickly.
|
||||||
|
|
||||||
# pick and autocopy
|
# pick, autocopy and get the value
|
||||||
hyprpicker -a
|
color=$(hyprpicker -a)
|
||||||
|
|
||||||
# get the value
|
echo "$color"
|
||||||
color=$(wl-paste)
|
|
||||||
|
|
||||||
image=/tmp/${color}.png
|
|
||||||
|
|
||||||
if [[ "$color" ]]; then
|
if [[ "$color" ]]; then
|
||||||
# generate preview
|
image=/tmp/${color}.png
|
||||||
convert -size 48x48 xc:"$color" "$image"
|
# generate preview
|
||||||
# notify the color
|
convert -size 48x48 xc:"$color" "$image"
|
||||||
notify-send -i "$image" "$color" "Copied to clipboard"
|
# notify the color
|
||||||
|
notify-send -i "$image" "$color" "Copied to clipboard"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue