]> git.sur5r.net Git - i3/i3status/blobdiff - config.c
Add support for differently named uevent data and hint for 9pnet_fd
[i3/i3status] / config.c
index bc1ec4fca29bf1d0c282b305ea31caf8ea614d5a..1b6fbec1b9aa69c6c450e4d7533c34c31aa8a12a 100644 (file)
--- a/config.c
+++ b/config.c
@@ -19,10 +19,12 @@ const char *wmii_path;
 const char *time_format;
 const char *battery_path;
 bool use_colors;
-const char *wmii_normcolors;
+bool get_ethspeed;
+const char *wmii_normcolors = "#222222 #333333";
 char order[MAX_ORDER][2];
 const char **run_watches;
 unsigned int num_run_watches;
+unsigned int interval = 1;
 
 void die(const char *fmt, ...);
 
@@ -152,16 +154,26 @@ int load_configuration(const char *configfile) {
                                SET_ORDER("load", ORDER_LOAD);
                                SET_ORDER("time", ORDER_TIME);
                                token = walk;
+                               while (isspace((int)(*token)))
+                                       token++;
                        }
                }
                OPT("color")
                {
                        use_colors = true;
                }
+               OPT("get_ethspeed")
+               {
+                       get_ethspeed = true;
+               }
                OPT("normcolors")
                {
                        wmii_normcolors = strdup(dest_value);
                }
+               OPT("interval")
+               {
+                       interval = atoi(dest_value);
+               }
                else
                {
                        result = -2;
@@ -172,7 +184,7 @@ int load_configuration(const char *configfile) {
        fclose(handle);
 
        if (wmii_path == NULL)
-               die("No wmii_path specified in configuration file");
+               exit(-4);
 
        return result;
 }