summaryrefslogtreecommitdiff
path: root/ansi-color-to-conky-color
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-01-22 12:04:34 +0100
committerErich Eckner <git@eckner.net>2020-01-22 12:04:34 +0100
commit4ecfb020f362aa42d20353f30e0474417bcbcdc5 (patch)
tree3d6e3610912deebdd1f15fec16c9690d090c3083 /ansi-color-to-conky-color
parentf03d4ee64d861a97dc330889f080bdc69924c454 (diff)
downloadansi-color-to-conky-color-4ecfb020f362aa42d20353f30e0474417bcbcdc5.tar.xz
ansi-color-to-conky-color: make bold really bold, not just white
Diffstat (limited to 'ansi-color-to-conky-color')
-rwxr-xr-xansi-color-to-conky-color27
1 files changed, 18 insertions, 9 deletions
diff --git a/ansi-color-to-conky-color b/ansi-color-to-conky-color
index 9b9b1be..1748906 100755
--- a/ansi-color-to-conky-color
+++ b/ansi-color-to-conky-color
@@ -1,12 +1,21 @@
#!/bin/bash
+font=$(
sed '
- s@\x1b\[0m@ ${color}@g
- '"$(
- while read -r code color; do
- printf 's@\\x1b\\[\\(0;\\)\\?%sm@ ${color %s}@g\n' \
- "${code}" \
- "${color}"
- done \
- <"${0%/*}/colors"
- )"
+ s/^\s*font\s*=\s*'"'"'\([^'"'"']\+\)'"'"',\?\s*$/\1/
+ t
+ d
+ ' ~/.conkyrc
+)
+
+sed '
+ s@\x1b\[0m@ ${color}${font}@g
+ s@\x1b\[1m@ ${font '"${font}"':style=bold}@g
+'"$(
+ while read -r code color; do
+ printf 's@\\x1b\\[\\(0;\\)\\?%sm@ ${color %s}@g\n' \
+ "${code}" \
+ "${color}"
+ done \
+ <"${0%/*}/colors"
+)"