Implement variables in configfile.
This implements ticket #42. Syntax is "set $key value". All further instances of $key will be replaced with value before parsing each line of the configfile.
This commit is contained in:
@ -15,6 +15,8 @@
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
#include "queue.h"
|
||||
|
||||
typedef struct Config Config;
|
||||
extern Config config;
|
||||
|
||||
@ -24,6 +26,13 @@ struct Colortriple {
|
||||
uint32_t text;
|
||||
};
|
||||
|
||||
struct Variable {
|
||||
char *key;
|
||||
char *value;
|
||||
|
||||
SLIST_ENTRY(Variable) variables;
|
||||
};
|
||||
|
||||
struct Config {
|
||||
const char *terminal;
|
||||
const char *font;
|
||||
|
Reference in New Issue
Block a user