dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit cc37bfd1f654cf3efd600f55e5380402ff3b6b25
parent 877d5f245fc07afaf92d0561dbc3aec13aea4b6d
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Thu, 13 Sep 2012 14:57:08 +0200

Make default colors configurable vi config.h

The first entry of the array is used for default values.

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>

Diffstat:
config.h | 3++-
dvtm.c | 9++++-----
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/config.h b/config.h @@ -95,8 +95,9 @@ Key keys[] = { }; static const ColorRule colorrules[] = { - /* title attrs fgcolor bgcolor */ + { "", A_NORMAL, -1, -1 }, /* default */ #if 0 + /* title attrs fgcolor bgcolor */ { "ssh", A_NORMAL, COLOR_BLACK, 224 }, #endif }; diff --git a/dvtm.c b/dvtm.c @@ -403,12 +403,11 @@ focus(Client *c) { static void applycolorrules(Client *c) { - unsigned int i; - unsigned attrs = A_NORMAL; - short fg = -1, bg = -1; - const ColorRule *r; + const ColorRule *r = colorrules; + short fg = r->fg, bg = r->bg; + unsigned attrs = r->attrs; - for (i = 0; i < countof(colorrules); i++) { + for (unsigned int i = 1; i < countof(colorrules); i++) { r = &colorrules[i]; if (strstr(c->title, r->title)) { attrs = r->attrs;