From f03d4ee64d861a97dc330889f080bdc69924c454 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 22 Jan 2020 11:52:54 +0100 Subject: shell -> ansi --- ansi-color-to-conky-color | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 ansi-color-to-conky-color (limited to 'ansi-color-to-conky-color') 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" + )" -- cgit v1.2.3