diff options
author | Erich Eckner <git@eckner.net> | 2020-01-22 11:52:54 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-01-22 11:52:54 +0100 |
commit | f03d4ee64d861a97dc330889f080bdc69924c454 (patch) | |
tree | 92ff14d16af6dcf782aec3522cd771ea8711a560 /ansi-color-to-conky-color | |
parent | 3b822a14caf20ff2fc6d0a9c926718ff990a1c08 (diff) | |
download | ansi-color-to-conky-color-f03d4ee64d861a97dc330889f080bdc69924c454.tar.xz |
shell -> ansi
Diffstat (limited to 'ansi-color-to-conky-color')
-rwxr-xr-x | ansi-color-to-conky-color | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ansi-color-to-conky-color b/ansi-color-to-conky-color new file mode 100755 index 0000000..9b9b1be --- /dev/null +++ b/ansi-color-to-conky-color @@ -0,0 +1,12 @@ +#!/bin/bash + + 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" + )" |