From 799a6634b7355b94bffb816c7a676175e5c62774 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Thu, 23 Apr 2020 13:32:12 +0200 Subject: bin/colorpick: fix notif --- bin/colorpick | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'bin') 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" -- cgit 1.4.1