summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2020-04-23 13:32:12 +0200
committerRobert Günzler <r@gnzler.io>2020-04-23 13:32:12 +0200
commit799a6634b7355b94bffb816c7a676175e5c62774 (patch)
treef249e4d71459405f5c74d1ddbe04488dba6952d9
parent63b0177e3a92a83711e4334966e0bb487a6ab249 (diff)
bin/colorpick: fix notif
-rwxr-xr-xbin/colorpick15
1 files changed, 12 insertions, 3 deletions
diff --git a/bin/colorpick b/bin/colorpick
index bb099cd..af2807f 100755
--- a/bin/colorpick
+++ b/bin/colorpick
@@ -1,6 +1,15 @@
 #!/bin/sh
 # dependencies: grim slurp wl-clipboard
 # src: https://git.sr.ht/~sircmpwn/dotfiles/tree/f9e7e88a72c2b87e5ab823205cb3a3aa8f3babd0/bin/colorpick
-color=$(grim -g "$(slurp -p -b 00000000)" - | convert - txt:- | awk 'END{print $3}')
-wl-copy "$color"
-notify-send "Color copied to clipboard" "$color" --icon '/usr/share/icons/Adwaita/scalable/actions/color-select-symbolic.svg'
+notify-send \
+	--icon '/usr/share/icons/Adwaita/scalable/actions/color-select-symbolic.svg' \
+	"Pick a color"
+
+(
+	color=$(grim -g "$(slurp -p -b 00000000)" - | convert - txt:- | awk 'END{print $3}')
+	wl-copy "$color"
+)
+
+notify-send \
+	--icon '/usr/share/icons/Adwaita/scalable/actions/color-select-symbolic.svg' \
+	"Color copied to clipboard" "$color"