diff --git a/.config/hypr/scripts/color_picker b/.config/hypr/scripts/color_picker index b6c44c09..c970ccf0 100755 --- a/.config/hypr/scripts/color_picker +++ b/.config/hypr/scripts/color_picker @@ -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