From 4109d9726398f59e0a183c4f44adc19b6d7346be Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 21 Jul 2019 11:06:28 +0200 Subject: conf: config now provides the colors (though still only hardcoded colors) --- config.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'config.c') 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(); -- cgit v1.3