summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2021-11-26 12:10:05 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2021-11-26 12:10:05 +0100
commit3cb7df56e0204bb8b0799a8317ef5a5f38802c7b (patch)
treee09077073cdcfc14d4202f6904935f2fa9de57bc /themes
parent618a6561cd09f489e30ab652da1649a0d1fec1d5 (diff)
import sfeed_curses
Import sfeed_curses into sfeed. The files are based of the commit 8e151ce48b503ad0ff0e24cb1be3bc93d6fbd895
Diffstat (limited to 'themes')
-rw-r--r--themes/mono.h13
-rw-r--r--themes/mono_highlight.h15
-rw-r--r--themes/newsboat.h13
-rw-r--r--themes/templeos.h24
4 files changed, 65 insertions, 0 deletions
diff --git a/themes/mono.h b/themes/mono.h
new file mode 100644
index 0000000..586ede0
--- /dev/null
+++ b/themes/mono.h
@@ -0,0 +1,13 @@
+/* default mono theme */
+#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 { if (p->focused) 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_LINEBAR() do { attrmode(ATTR_FAINT_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)
diff --git a/themes/mono_highlight.h b/themes/mono_highlight.h
new file mode 100644
index 0000000..180f651
--- /dev/null
+++ b/themes/mono_highlight.h
@@ -0,0 +1,15 @@
+/* mono theme with highlighting of the active panel.
+ The faint attribute may not work on all terminals though.
+ The combination bold with faint generally does not work either. */
+#define THEME_ITEM_NORMAL() do { } while(0)
+#define THEME_ITEM_FOCUS() do { } while(0)
+#define THEME_ITEM_BOLD() do { if (p->focused || !selected) attrmode(ATTR_BOLD_ON); } while(0)
+#define THEME_ITEM_SELECTED() do { attrmode(ATTR_REVERSE_ON); if (!p->focused) attrmode(ATTR_FAINT_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_LINEBAR() do { attrmode(ATTR_FAINT_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)
diff --git a/themes/newsboat.h b/themes/newsboat.h
new file mode 100644
index 0000000..b00111d
--- /dev/null
+++ b/themes/newsboat.h
@@ -0,0 +1,13 @@
+/* newsboat-like (blue, yellow) */
+#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 { if (p->focused) ttywrite("\x1b[93;44m"); } while(0) /* bright yellow fg, blue bg */
+#define THEME_SCROLLBAR_FOCUS() do { ttywrite("\x1b[34m"); } while(0) /* blue fg */
+#define THEME_SCROLLBAR_NORMAL() do { ttywrite("\x1b[34m"); } while(0)
+#define THEME_SCROLLBAR_TICK_FOCUS() do { ttywrite("\x1b[44m"); } while(0) /* blue bg */
+#define THEME_SCROLLBAR_TICK_NORMAL() do { ttywrite("\x1b[44m"); } while(0)
+#define THEME_LINEBAR() do { ttywrite("\x1b[34m"); } while(0)
+#define THEME_STATUSBAR() do { attrmode(ATTR_BOLD_ON); ttywrite("\x1b[93;44m"); } while(0)
+#define THEME_INPUT_LABEL() do { } while(0)
+#define THEME_INPUT_NORMAL() do { } while(0)
diff --git a/themes/templeos.h b/themes/templeos.h
new file mode 100644
index 0000000..7f9d770
--- /dev/null
+++ b/themes/templeos.h
@@ -0,0 +1,24 @@
+/* TempleOS-like (for fun and god) */
+/* set true-color foreground / background, Terry would've preferred ANSI */
+#define SETFGCOLOR(r,g,b) ttywritef("\x1b[38;2;%d;%d;%dm", r, g, b)
+#define SETBGCOLOR(r,g,b) ttywritef("\x1b[48;2;%d;%d;%dm", r, g, b)
+
+#define THEME_ITEM_NORMAL() do { SETFGCOLOR(0x00, 0x00, 0xaa); SETBGCOLOR(0xff, 0xff, 0xff); } while(0)
+#define THEME_ITEM_FOCUS() do { SETFGCOLOR(0x00, 0x00, 0xaa); SETBGCOLOR(0xff, 0xff, 0xff); } while(0)
+#define THEME_ITEM_BOLD() do { attrmode(ATTR_BOLD_ON); SETFGCOLOR(0xaa, 0x00, 0x00); SETBGCOLOR(0xff, 0xff, 0xff); } while(0)
+#define THEME_ITEM_SELECTED() do { if (p->focused) attrmode(ATTR_REVERSE_ON); } while(0)
+#define THEME_SCROLLBAR_FOCUS() do { SETFGCOLOR(0x00, 0x00, 0xaa); SETBGCOLOR(0xff, 0xff, 0xff); } while(0)
+#define THEME_SCROLLBAR_NORMAL() do { SETFGCOLOR(0x00, 0x00, 0xaa); SETBGCOLOR(0xff, 0xff, 0xff); } while(0)
+#define THEME_SCROLLBAR_TICK_FOCUS() do { SETBGCOLOR(0x00, 0x00, 0xaa); SETFGCOLOR(0xff, 0xff, 0xff); } while(0)
+#define THEME_SCROLLBAR_TICK_NORMAL() do { SETBGCOLOR(0x00, 0x00, 0xaa); SETFGCOLOR(0xff, 0xff, 0xff); } while(0)
+#define THEME_LINEBAR() do { SETFGCOLOR(0x00, 0x00, 0xaa); SETBGCOLOR(0xff, 0xff, 0xff); } while(0)
+#define THEME_STATUSBAR() do { ttywrite("\x1b[6m"); SETBGCOLOR(0x00, 0x00, 0xaa); SETFGCOLOR(0xff, 0xff, 0xff); } while(0) /* blink statusbar */
+#define THEME_INPUT_LABEL() do { SETFGCOLOR(0x00, 0x00, 0xaa); SETBGCOLOR(0xff, 0xff, 0xff); } while(0)
+#define THEME_INPUT_NORMAL() do { SETFGCOLOR(0x00, 0x00, 0xaa); SETBGCOLOR(0xff, 0xff, 0xff); } while(0)
+
+#undef SCROLLBAR_SYMBOL_BAR
+#define SCROLLBAR_SYMBOL_BAR "\xe2\x95\x91" /* symbol: "double vertical" */
+#undef LINEBAR_SYMBOL_BAR
+#define LINEBAR_SYMBOL_BAR "\xe2\x95\x90" /* symbol: "double horizontal" */
+#undef LINEBAR_SYMBOL_RIGHT
+#define LINEBAR_SYMBOL_RIGHT "\xe2\x95\xa3" /* symbol: "double vertical and left" */