🐛 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.
|
||||
|
||||
# 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
|
||||
# generate preview
|
||||
convert -size 48x48 xc:"$color" "$image"
|
||||
# notify the color
|
||||
notify-send -i "$image" "$color" "Copied to clipboard"
|
||||
image=/tmp/${color}.png
|
||||
# generate preview
|
||||
convert -size 48x48 xc:"$color" "$image"
|
||||
# notify the color
|
||||
notify-send -i "$image" "$color" "Copied to clipboard"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue