-
- /* Read tint-0.6 config for backward compatibility */
- else if (strcmp (key, "panel_mode") == 0) {
- if (strcmp (value, "single_desktop") == 0) panel_mode = SINGLE_DESKTOP;
- else panel_mode = MULTI_DESKTOP;
- }
- else if (strcmp (key, "panel_rounded") == 0) {
- Area *a = calloc(1, sizeof(Area));
- a->pix.border.rounded = atoi (value);
- list_back = g_slist_append(list_back, a);
- }
- else if (strcmp (key, "panel_border_width") == 0) {
- Area *a = g_slist_last(list_back)->data;
- a->pix.border.width = atoi (value);
- }
- else if (strcmp (key, "panel_background_color") == 0) {
- Area *a = g_slist_last(list_back)->data;
- extract_values(value, &value1, &value2, &value3);
- get_color (value1, a->pix.back.color);
- if (value2) a->pix.back.alpha = (atoi (value2) / 100.0);
- else a->pix.back.alpha = 0.5;
- }
- else if (strcmp (key, "panel_border_color") == 0) {
- Area *a = g_slist_last(list_back)->data;
- extract_values(value, &value1, &value2, &value3);
- get_color (value1, a->pix.border.color);
- if (value2) a->pix.border.alpha = (atoi (value2) / 100.0);
- else a->pix.border.alpha = 0.5;
- }
- else if (strcmp (key, "task_text_centered") == 0)
- panel_config.g_task.centered = atoi (value);
- else if (strcmp (key, "task_margin") == 0) {
- panel_config.g_taskbar.paddingxlr = 0;
- panel_config.g_taskbar.paddingx = atoi (value);
- }
- else if (strcmp (key, "task_icon_size") == 0)
- old_task_icon_size = atoi (value);
- else if (strcmp (key, "task_rounded") == 0) {
- area_task = calloc(1, sizeof(Area));
- area_task->pix.border.rounded = atoi (value);
- list_back = g_slist_append(list_back, area_task);
-
- area_task_active = calloc(1, sizeof(Area));
- area_task_active->pix.border.rounded = atoi (value);
- list_back = g_slist_append(list_back, area_task_active);
- }
- else if (strcmp (key, "task_background_color") == 0) {
- extract_values(value, &value1, &value2, &value3);
- get_color (value1, area_task->pix.back.color);
- if (value2) area_task->pix.back.alpha = (atoi (value2) / 100.0);
- else area_task->pix.back.alpha = 0.5;
- }
- else if (strcmp (key, "task_active_background_color") == 0) {
- extract_values(value, &value1, &value2, &value3);
- get_color (value1, area_task_active->pix.back.color);
- if (value2) area_task_active->pix.back.alpha = (atoi (value2) / 100.0);
- else area_task_active->pix.back.alpha = 0.5;
- }
- else if (strcmp (key, "task_border_width") == 0) {
- area_task->pix.border.width = atoi (value);
- area_task_active->pix.border.width = atoi (value);
- }
- else if (strcmp (key, "task_border_color") == 0) {
- extract_values(value, &value1, &value2, &value3);
- get_color (value1, area_task->pix.border.color);
- if (value2) area_task->pix.border.alpha = (atoi (value2) / 100.0);
- else area_task->pix.border.alpha = 0.5;
- }
- else if (strcmp (key, "task_active_border_color") == 0) {
- extract_values(value, &value1, &value2, &value3);
- get_color (value1, area_task_active->pix.border.color);
- if (value2) area_task_active->pix.border.alpha = (atoi (value2) / 100.0);
- else area_task_active->pix.border.alpha = 0.5;
+ /* autohide options */
+ else if (strcmp(key, "autohide") == 0)
+ panel_autohide = atoi(value);
+ else if (strcmp(key, "autohide_show_timeout") == 0)
+ panel_autohide_show_timeout = 1000*atof(value);
+ else if (strcmp(key, "autohide_hide_timeout") == 0)
+ panel_autohide_hide_timeout = 1000*atof(value);
+ else if (strcmp(key, "strut_policy") == 0) {
+ if (strcmp(value, "follow_size") == 0)
+ panel_strut_policy = STRUT_FOLLOW_SIZE;
+ else if (strcmp(value, "none") == 0)
+ panel_strut_policy = STRUT_NONE;
+ else
+ panel_strut_policy = STRUT_MINIMUM;
+ }
+ else if (strcmp(key, "autohide_height") == 0) {
+ panel_autohide_height = atoi(value);
+ if (panel_autohide_height == 0) {
+ // autohide need height > 0
+ panel_autohide_height = 1;
+ }