sfeed_curses

[fork] sfeed (atom feed) reader
Log | Files | Refs | README | LICENSE

commit b86ee4555c504170c3d0a170ec520399c82357ae
parent f735084bccd1baf95023f6bff70e3e28354d0b73
Author: hhvn <hayden@haydenvh.com>
Date:   Mon, 12 Oct 2020 01:09:13 +0100

themeing

Diffstat:
A.gitignore | 2++
Msfeed_curses.c | 29++++++++++++++---------------
2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,2 @@ +sfeed_curses +*.o diff --git a/sfeed_curses.c b/sfeed_curses.c @@ -28,22 +28,21 @@ #define LEN(a) sizeof((a))/sizeof((a)[0]) +#define SCROLLBAR_SYMBOL_BAR "|" +#define SCROLLBAR_SYMBOL_TICK "\x1b[37m|" #define PAD_TRUNCATE_SYMBOL "\xe2\x80\xa6" /* symbol: "ellipsis" */ -#define SCROLLBAR_SYMBOL_BAR "\xe2\x94\x82" /* symbol: "light vertical" */ -#define SCROLLBAR_SYMBOL_TICK " " - -/* See the README for some color theme examples. */ -#define THEME_ITEM_NORMAL() do { } while(0) -#define THEME_ITEM_FOCUS() do { } while(0) -#define THEME_ITEM_BOLD() do { attrmode(ATTR_BOLD_ON); } while(0) -#define THEME_ITEM_SELECTED() do { attrmode(ATTR_REVERSE_ON); } while(0) -#define THEME_SCROLLBAR_FOCUS() do { } while(0) -#define THEME_SCROLLBAR_NORMAL() do { attrmode(ATTR_FAINT_ON); } while(0) -#define THEME_SCROLLBAR_TICK_FOCUS() do { attrmode(ATTR_REVERSE_ON); } while(0) -#define THEME_SCROLLBAR_TICK_NORMAL() do { attrmode(ATTR_REVERSE_ON); } while(0) -#define THEME_STATUSBAR() do { attrmode(ATTR_REVERSE_ON); } while(0) -#define THEME_INPUT_LABEL() do { attrmode(ATTR_REVERSE_ON); } while(0) -#define THEME_INPUT_NORMAL() do { } while(0) + +#define THEME_ITEM_NORMAL() do { ttywrite("\x1b[32m"); } while(0) +#define THEME_ITEM_FOCUS() do { ttywrite("\x1b[33m"); } while(0) +#define THEME_ITEM_BOLD() do { ttywrite("\x1b[34;1m"); } while(0) +#define THEME_ITEM_SELECTED() do { ttywrite("\x1b[93;40m"); } while(0) /* bright yellow fg, blue bg */ +#define THEME_SCROLLBAR_FOCUS() do { ttywrite("\x1b[35m"); } while(0) /* blue fg */ +#define THEME_SCROLLBAR_NORMAL() do { ttywrite("\x1b[30m"); } while(0) +#define THEME_SCROLLBAR_TICK_FOCUS() do { ttywrite("\x1b[35m"); } while(0) /* blue bg */ +#define THEME_SCROLLBAR_TICK_NORMAL() do { ttywrite("\x1b[30m"); } while(0) +#define THEME_STATUSBAR() do { attrmode(ATTR_BOLD_ON); ttywrite("\x1b[40m\x1b[92m"); } while(0) +#define THEME_INPUT_LABEL() do { } while(0) +#define THEME_INPUT_NORMAL() do { } while(0) static char *plumbercmd = "xdg-open"; /* env variable: $SFEED_PLUMBER */ static char *pipercmd = "sfeed_content"; /* env variable: $SFEED_PIPER */