summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-12-21 06:31:54 -0600
committerRobin Jarry <robin@jarry.cc>2022-12-21 21:24:42 +0100
commita4d7b5fc96bc2b28a18400f127b710464a143067 (patch)
tree3d221c1abe0534efe804ed1e759bb3acc3f96291
parent8ce96f1716bca832b4ee1593aa3489adc932e2e9 (diff)
downloadaerc-a4d7b5fc96bc2b28a18400f127b710464a143067.tar.gz
aerc-a4d7b5fc96bc2b28a18400f127b710464a143067.zip
colorize: add 'terminal' theme which respects termcolors
Add a "terminal" theme to colorize script. The "terminal" theme respects the users' configured terminal color scheme. Also links are blue underlined. Usage: colorize -v theme=terminal Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
-rwxr-xr-xfilters/colorize16
1 files changed, 16 insertions, 0 deletions
diff --git a/filters/colorize b/filters/colorize
index ad86d504..9d2a7363 100755
--- a/filters/colorize
+++ b/filters/colorize
@@ -40,6 +40,22 @@ BEGIN {
quote_x = "\033[38;2;128;128;128m" # gray
bold = "\033[1m"
reset = "\033[0m"
+ } else if (theme == "terminal") {
+ # terminal respects the users configured terminal color theme
+ url = "\033[4;34m" # underline blue
+ header = "\033[35m" # magenta
+ signature = "\033[35m" # magenta
+ diff_meta = "\033[2m" # faint
+ diff_chunk = "\033[36m" # cyan
+ diff_add = "\033[32m" # green
+ diff_del = "\033[31m" # red
+ quote_1 = "\033[37m" # grey
+ quote_2 = "\033[34m" # blue
+ quote_3 = "\033[2;37m" # faint grey
+ quote_4 = "\033[2;34m" # faint blue
+ quote_x = "\033[2;37m" # faint grey
+ bold = "\033[1m"
+ reset = "\033[0m"
} else {
print "error: unknown theme " theme > "/dev/stderr"
exit 1