add config, a simple config interface. i.e. key-value-store
[staging/windowmanager.git] / src / config.cpp
diff --git a/src/config.cpp b/src/config.cpp
new file mode 100644 (file)
index 0000000..1843639
--- /dev/null
@@ -0,0 +1,15 @@
+//
+// Created by mfritzsc on 8/1/17.
+//
+
+#include "config.hpp"
+
+namespace wm {
+
+config::config() : cfg() {
+   // Supply default values for these...
+   this->cfg["layers.json"] = getenv("LAYERS_JSON") ?: "../layers.json";
+   this->cfg["layout.json"] = getenv("LAYOUT_JSON") ?: "../layout.json";
+}
+
+}  // namespace wm
\ No newline at end of file