aboutsummaryrefslogtreecommitdiff
path: root/scripts/dot-local/bin/colorpick
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dot-local/bin/colorpick')
-rwxr-xr-xscripts/dot-local/bin/colorpick6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/dot-local/bin/colorpick b/scripts/dot-local/bin/colorpick
new file mode 100755
index 0000000..6159387
--- /dev/null
+++ b/scripts/dot-local/bin/colorpick
@@ -0,0 +1,6 @@
+#!/bin/sh
+color=$(grim -g "$(slurp -p -b00000000)" -t ppm - | magick convert - -format '%[pixel:p{0,0}]' txt:- | tail -n 1 | awk '{print $3}')
+if [ -n "$color" ]; then
+ notify-send "ColorPick" "$color"
+ wl-copy "$color"
+fi