dvtm

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

commit 8f3210bf770929781ef20d9e18bdc30f8a2d78e3
parent f53a80482d9d1379c6aefac27cc9060fe6420fa4
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Thu, 18 Sep 2008 20:50:18 +0200

Rename some #defines add common prefix

Diffstat:
config.h | 16++++++++--------
dvtm.c | 8++++----
statusbar.c | 4++--
3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/config.h b/config.h @@ -12,19 +12,19 @@ * A_INVIS Invisible or blank mode * */ -#define ATTR_SELECTED A_NORMAL -#define FG_SELECTED COLORS==256 ? 68 : COLOR_BLUE -#define BG_SELECTED -1 +#define SELECTED_ATTR A_NORMAL +#define SELECTED_FG COLORS==256 ? 68 : COLOR_BLUE +#define SELECTED_BG -1 /* curses attributes for normal (not selected) windows */ -#define ATTR_NORMAL A_NORMAL -#define FG_NORMAL -1 -#define BG_NORMAL -1 +#define NORMAL_ATTR A_NORMAL +#define NORMAL_FG -1 +#define NORMAL_BG -1 /* status bar (command line option -s) position */ #define BARPOS BarTop /* BarBot, BarOff */ /* curses attributes for the status bar */ #define BAR_ATTR A_NORMAL -#define FG_BAR COLOR_RED -#define BG_BAR -1 +#define BAR_FG COLOR_RED +#define BAR_BG -1 /* true if the statusbar text should be right aligned, * set to false if you prefer it left aligned */ #define BAR_ALIGN_RIGHT true diff --git a/dvtm.c b/dvtm.c @@ -452,11 +452,11 @@ draw_border(Client *c) { char *s, t = '\0'; int x, y, o; if (sel == c) { - wattrset(c->window, ATTR_SELECTED); - madtty_color_set(c->window, FG_SELECTED, BG_SELECTED); + wattrset(c->window, SELECTED_ATTR); + madtty_color_set(c->window, SELECTED_FG, SELECTED_BG); } else { - wattrset(c->window, ATTR_NORMAL); - madtty_color_set(c->window, FG_NORMAL, BG_NORMAL); + wattrset(c->window, NORMAL_ATTR); + madtty_color_set(c->window, NORMAL_FG, NORMAL_BG); } getyx(c->window, y, x); curs_set(0); diff --git a/statusbar.c b/statusbar.c @@ -29,7 +29,7 @@ drawbar() { return; curs_set(0); attrset(BAR_ATTR); - madtty_color_set(stdscr, FG_BAR, BG_BAR); + madtty_color_set(stdscr, BAR_FG, BAR_BG); mvaddch(by, 0, '['); stext[maxlen] = '\0'; l = strlen(stext); @@ -42,7 +42,7 @@ drawbar() { addstr(stext); stext[maxlen] = t; addch(']'); - attrset(ATTR_NORMAL); + attrset(NORMAL_ATTR); if (sel) curs_set(madtty_cursor(sel->term)); refresh();