]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/include/config.h
Merge pull request #1669 from Airblader/feature-docs-2
[i3/i3] / i3bar / include / config.h
index 0496f4315f7da44392b8600276307f47bb1c7cbc..aeb9f0fd1b523606b542f8f917198e6547d69c8e 100644 (file)
@@ -1,11 +1,62 @@
-#ifndef CONFIG_H_
-#define CONFIL_H_
+/*
+ * vim:ts=4:sw=4:expandtab
+ *
+ * i3bar - an xcb-based status- and ws-bar for i3
+ * © 2010 Axel Wagner and contributors (see also: LICENSE)
+ *
+ * config.c: Parses the configuration (received from i3).
+ *
+ */
+#pragma once
+
+#include "common.h"
+
+typedef enum {
+    POS_NONE = 0,
+    POS_TOP,
+    POS_BOT
+} position_t;
+
+/* Bar display mode (hide unless modifier is pressed or show in dock mode or always hide in invisible mode) */
+typedef enum { M_DOCK = 0,
+               M_HIDE = 1,
+               M_INVISIBLE = 2 } bar_display_mode_t;
 
 typedef struct config_t {
-    int hide_on_modifier;
+    int modifier;
+    char *wheel_up_cmd;
+    char *wheel_down_cmd;
+    position_t position;
     int verbose;
+    struct xcb_color_strings_t colors;
+    bool disable_binding_mode_indicator;
+    bool disable_ws;
+    bool strip_ws_numbers;
+    char *bar_id;
+    char *command;
+    char *fontname;
+    i3String *separator_symbol;
+    char *tray_output;
+    int num_outputs;
+    char **outputs;
+
+    bar_display_mode_t hide_on_modifier;
+
+    /* The current hidden_state of the bar, which indicates whether it is hidden or shown */
+    enum { S_HIDE = 0,
+           S_SHOW = 1 } hidden_state;
 } config_t;
 
 config_t config;
 
-#endif
+/**
+ * Start parsing the received bar configuration JSON string
+ *
+ */
+void parse_config_json(char *json);
+
+/**
+ * free()s the color strings as soon as they are not needed anymore.
+ *
+ */
+void free_colors(struct xcb_color_strings_t *colors);