summaryrefslogtreecommitdiff
path: root/.local/bin/colorhandler
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-07-15 13:15:47 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2024-07-15 13:15:47 -0400
commit114d8f292d177b71ea08c55b70d7856e1bc50baa (patch)
tree14e632a79458f24945b5b312660e5171779466b5 /.local/bin/colorhandler
parent2ac634353abc4175236181732f8d23bdad8fc0eb (diff)
ttf/otf font preview within lf
Diffstat (limited to '.local/bin/colorhandler')
-rwxr-xr-x.local/bin/colorhandler4
1 files changed, 3 insertions, 1 deletions
diff --git a/.local/bin/colorhandler b/.local/bin/colorhandler
index 7e35263..3f0f18f 100755
--- a/.local/bin/colorhandler
+++ b/.local/bin/colorhandler
@@ -1,6 +1,8 @@
#!/bin/sh
-col=$(colorpicker --short --one-shot)
+[ -z "$1" ] && col=$(colorpicker --short --one-shot) ||
+ col="$1"
+
sed "s/fill=.*>/fill=\"$col\">/g" $HOME/.local/share/circle.svg > /tmp/circle.svg