summaryrefslogtreecommitdiff
path: root/.local/bin/colorhandler
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/colorhandler')
-rwxr-xr-x.local/bin/colorhandler9
1 files changed, 9 insertions, 0 deletions
diff --git a/.local/bin/colorhandler b/.local/bin/colorhandler
new file mode 100755
index 0000000..dabff18
--- /dev/null
+++ b/.local/bin/colorhandler
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+col=$(colorpicker --short --one-shot)
+
+sed "s/fill=.*>/fill=\"$col\">/g" $HOME/.cache/circle.svg > /tmp/circle.svg
+
+echo "$col" > xsel -b
+
+notify-send -i "/tmp/circle.svg" -a "Colorpicker" "$col was successfully copied to your clipboard."