X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fconfig.c;h=150face8b7f172eac0b7536f94dc4c951419a445;hb=9f561215b52f7e275bbe50faa68cfc9fbc935994;hp=f825d5b9ce44d045690964234fbf2d9aa3c0f9a9;hpb=490afac2d1475afe16bcc67e57123dd8ff25ccd8;p=chaz%2Ftint2 diff --git a/src/config.c b/src/config.c index f825d5b..150face 100644 --- a/src/config.c +++ b/src/config.c @@ -185,6 +185,30 @@ int get_task_status(char* status) } +int config_get_monitor(char* monitor) +{ + if (strcmp(monitor, "all") == 0) + return -1; + else { + char* endptr; + int ret_int = strtol(monitor, &endptr, 10); + if (*endptr == 0) + return ret_int-1; + else { + // monitor specified by name, not by index + int i, j; + for (i=0; i 0) panel_config.monitor -= 1; - } + panel_config.monitor = config_get_monitor(value); } else if (strcmp (key, "panel_size") == 0) { extract_values(value, &value1, &value2, &value3);