aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/colorpick
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin/colorpick')
-rwxr-xr-xdotfiles/.local/bin/colorpick6
1 files changed, 6 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/colorpick b/dotfiles/.local/bin/colorpick
new file mode 100755
index 0000000..efb67cc
--- /dev/null
+++ b/dotfiles/.local/bin/colorpick
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Taken and slightly modified from Drew DeVault's dotfiles
+
+color=$(grim -g "$(slurp -p -b 00000000)" - | convert - txt:- | awk 'END{print $3}')
+wl-copy "$color"
+notify-send "🎨 Color copied to clipboard" "<span color=\"$color\">$color</span>"