aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-21 09:06:28 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-21 09:06:28 +0000
commit4109d9726398f59e0a183c4f44adc19b6d7346be (patch)
tree018d1b95dcb83df36bd848fff82c03004d3c38f0 /config.c
parentterm: prepare for configurable colors; add color variables to terminal (diff)
conf: config now provides the colors (though still only hardcoded colors)
Diffstat (limited to 'config.c')
-rw-r--r--config.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/config.c b/config.c
index 6d234264..a8135b53 100644
--- a/config.c
+++ b/config.c
@@ -16,6 +16,31 @@
#define LOG_ENABLE_DBG 0
#include "log.h"
+static const uint32_t default_foreground = 0xdcdccc;
+static const uint32_t default_background = 0x111111;
+
+static const uint32_t default_regular[] = {
+ 0x000000,
+ 0xcc9393,
+ 0x7f9f7f,
+ 0xd0bf8f,
+ 0x6ca0a3,
+ 0xdc8cc3,
+ 0x93e0e3,
+ 0xdcdccc,
+};
+
+static const uint32_t default_bright[] = {
+ 0x000000,
+ 0xdca3a3,
+ 0xbfebbf,
+ 0xf0dfaf,
+ 0x8cd0d3,
+ 0xdc8cc3,
+ 0x93e0e3,
+ 0xffffff,
+};
+
static char *
get_shell(void)
{
@@ -219,6 +244,31 @@ config_load(struct config *conf)
.term = strdup("foot"),
.shell = get_shell(),
.font = strdup("monospace"),
+
+ .colors = {
+ .fg = default_foreground,
+ .bg = default_background,
+ .regular = {
+ default_regular[0],
+ default_regular[1],
+ default_regular[2],
+ default_regular[3],
+ default_regular[4],
+ default_regular[5],
+ default_regular[6],
+ default_regular[7],
+ },
+ .bright = {
+ default_bright[0],
+ default_bright[1],
+ default_bright[2],
+ default_bright[3],
+ default_bright[4],
+ default_bright[5],
+ default_bright[6],
+ default_bright[7],
+ },
+ },
};
char *path = get_config_path();