- panel_config->g_task.maximum_height = atoi (value2);
- }
- else if (strcmp (key, "task_padding") == 0) {
- extract_values(value, &value1, &value2, &value3);
- panel_config->g_task.area.paddingxlr = panel_config->g_task.area.paddingx = atoi (value1);
- if (value2) panel_config->g_task.area.paddingy = atoi (value2);
- if (value3) panel_config->g_task.area.paddingx = atoi (value3);
- }
- else if (strcmp (key, "task_font") == 0) {
- if (save_file_config) old_task_font = strdup (value);
- if (panel_config->g_task.font_desc) pango_font_description_free(panel_config->g_task.font_desc);
- panel_config->g_task.font_desc = pango_font_description_from_string (value);
- }
- else if (strcmp (key, "task_font_color") == 0) {
- extract_values(value, &value1, &value2, &value3);
- get_color (value1, panel_config->g_task.font.color);
- if (value2) panel_config->g_task.font.alpha = (atoi (value2) / 100.0);
- else panel_config->g_task.font.alpha = 0.1;
- }
- else if (strcmp (key, "task_active_font_color") == 0) {
- extract_values(value, &value1, &value2, &value3);
- get_color (value1, panel_config->g_task.font_active.color);
- if (value2) panel_config->g_task.font_active.alpha = (atoi (value2) / 100.0);
- else panel_config->g_task.font_active.alpha = 0.1;
- }
- else if (strcmp (key, "task_icon_hsb") == 0) {
- extract_values(value, &value1, &value2, &value3);
- panel_config->g_task.hue = atoi(value1);
- panel_config->g_task.saturation = atoi(value2);
- panel_config->g_task.brightness = atoi(value3);
- }
- else if (strcmp (key, "task_active_icon_hsb") == 0) {
- extract_values(value, &value1, &value2, &value3);
- panel_config->g_task.hue_active = atoi(value1);
- panel_config->g_task.saturation_active = atoi(value2);
- panel_config->g_task.brightness_active = atoi(value3);
- }
- else if (strcmp (key, "task_background_id") == 0) {
- int id = atoi (value);
- Area *a = g_slist_nth_data(list_back, id);
- memcpy(&panel_config->g_task.area.pix.back, &a->pix.back, sizeof(Color));
- memcpy(&panel_config->g_task.area.pix.border, &a->pix.border, sizeof(Border));
- }
- else if (strcmp (key, "task_active_background_id") == 0) {
- int id = atoi (value);
- Area *a = g_slist_nth_data(list_back, id);
- memcpy(&panel_config->g_task.area.pix_active.back, &a->pix.back, sizeof(Color));
- memcpy(&panel_config->g_task.area.pix_active.border, &a->pix.border, sizeof(Border));
- }
-
- /* Systray */
- else if (strcmp (key, "systray_padding") == 0) {
- extract_values(value, &value1, &value2, &value3);
- systray.area.paddingxlr = systray.area.paddingx = atoi (value1);
- if (value2) systray.area.paddingy = atoi (value2);
- if (value3) systray.area.paddingx = atoi (value3);
- systray.area.on_screen = 1;
- }
- else if (strcmp (key, "systray_background_id") == 0) {
- int id = atoi (value);
- Area *a = g_slist_nth_data(list_back, id);
- memcpy(&systray.area.pix.back, &a->pix.back, sizeof(Color));
- memcpy(&systray.area.pix.border, &a->pix.border, sizeof(Border));
- }
-
- /* Mouse actions */
- else if (strcmp (key, "mouse_middle") == 0)
- get_action (value, &mouse_middle);
- else if (strcmp (key, "mouse_right") == 0)
- get_action (value, &mouse_right);
- else if (strcmp (key, "mouse_scroll_up") == 0)
- get_action (value, &mouse_scroll_up);
- else if (strcmp (key, "mouse_scroll_down") == 0)
- get_action (value, &mouse_scroll_down);
-
-
- /* Read tint-0.6 config for backward compatibility */
- else if (strcmp (key, "panel_mode") == 0) {
+ panel_config.g_task.maximum_height = atoi (value2);
+ }
+ else if (strcmp (key, "task_padding") == 0) {
+ extract_values(value, &value1, &value2, &value3);
+ panel_config.g_task.area.paddingxlr = panel_config.g_task.area.paddingx = atoi (value1);
+ if (value2) panel_config.g_task.area.paddingy = atoi (value2);
+ if (value3) panel_config.g_task.area.paddingx = atoi (value3);
+ }
+ else if (strcmp (key, "task_font") == 0) {
+ if (save_file_config) old_task_font = strdup (value);
+ if (panel_config.g_task.font_desc) pango_font_description_free(panel_config.g_task.font_desc);
+ panel_config.g_task.font_desc = pango_font_description_from_string (value);
+ }
+ else if (strcmp (key, "task_font_color") == 0) {
+ extract_values(value, &value1, &value2, &value3);
+ get_color (value1, panel_config.g_task.font.color);
+ if (value2) panel_config.g_task.font.alpha = (atoi (value2) / 100.0);
+ else panel_config.g_task.font.alpha = 0.1;
+ }
+ else if (strcmp (key, "task_active_font_color") == 0) {
+ extract_values(value, &value1, &value2, &value3);
+ get_color (value1, panel_config.g_task.font_active.color);
+ if (value2) panel_config.g_task.font_active.alpha = (atoi (value2) / 100.0);
+ else panel_config.g_task.font_active.alpha = 0.1;
+ }
+ else if (strcmp (key, "task_icon_asb") == 0) {
+ extract_values(value, &value1, &value2, &value3);
+ panel_config.g_task.alpha = atoi(value1);
+ panel_config.g_task.saturation = atoi(value2);
+ panel_config.g_task.brightness = atoi(value3);
+ }
+ else if (strcmp (key, "task_active_icon_asb") == 0) {
+ extract_values(value, &value1, &value2, &value3);
+ panel_config.g_task.alpha_active = atoi(value1);
+ panel_config.g_task.saturation_active = atoi(value2);
+ panel_config.g_task.brightness_active = atoi(value3);
+ }
+ else if (strcmp (key, "task_background_id") == 0) {
+ int id = atoi (value);
+ Area *a = g_slist_nth_data(list_back, id);
+ memcpy(&panel_config.g_task.area.pix.back, &a->pix.back, sizeof(Color));
+ memcpy(&panel_config.g_task.area.pix.border, &a->pix.border, sizeof(Border));
+ }
+ else if (strcmp (key, "task_active_background_id") == 0) {
+ int id = atoi (value);
+ Area *a = g_slist_nth_data(list_back, id);
+ memcpy(&panel_config.g_task.area.pix_active.back, &a->pix.back, sizeof(Color));
+ memcpy(&panel_config.g_task.area.pix_active.border, &a->pix.border, sizeof(Border));
+ }
+
+ /* Systray */
+ else if (strcmp (key, "systray_padding") == 0) {
+ extract_values(value, &value1, &value2, &value3);
+ systray.area.paddingxlr = systray.area.paddingx = atoi (value1);
+ if (value2) systray.area.paddingy = atoi (value2);
+ if (value3) systray.area.paddingx = atoi (value3);
+ systray.area.on_screen = 1;
+ }
+ else if (strcmp (key, "systray_background_id") == 0) {
+ int id = atoi (value);
+ Area *a = g_slist_nth_data(list_back, id);
+ memcpy(&systray.area.pix.back, &a->pix.back, sizeof(Color));
+ memcpy(&systray.area.pix.border, &a->pix.border, sizeof(Border));
+ }
+ else if (strcmp(key, "systray_sort") == 0) {
+ if (strcmp(value, "descending") == 0)
+ systray.sort = -1;
+ else if (strcmp(value, "ascending") == 0)
+ systray.sort = 1;
+ else if (strcmp(value, "left2right") == 0)
+ systray.sort = 2;
+ else if (strcmp(value, "right2left") == 0)
+ systray.sort = 3;
+ }
+
+ /* Tooltip */
+ else if (strcmp (key, "tooltip") == 0)
+ g_tooltip.enabled = atoi(value);
+ else if (strcmp (key, "tooltip_show_timeout") == 0) {
+ double timeout = atof(value);
+ int sec = (int)timeout;
+ int usec = (timeout-sec)*1e6;
+ g_tooltip.show_timeout.it_value = (struct timeval){.tv_sec=sec, .tv_usec=usec};
+ }
+ else if (strcmp (key, "tooltip_hide_timeout") == 0) {
+ double timeout = atof(value);
+ int sec = (int)timeout;
+ int usec = (timeout-sec)*1e6;
+ g_tooltip.hide_timeout.it_value = (struct timeval){.tv_sec=sec, .tv_usec=usec};
+ }
+ else if (strcmp (key, "tooltip_padding") == 0) {
+ extract_values(value, &value1, &value2, &value3);
+ if (value1) g_tooltip.paddingx = atoi(value1);
+ if (value2) g_tooltip.paddingy = atoi(value2);
+ }
+ else if (strcmp (key, "tooltip_background_id") == 0) {
+ int id = atoi (value);
+ Area *a = g_slist_nth_data(list_back, id);
+ memcpy(&g_tooltip.background_color, &a->pix.back, sizeof(Color));
+ memcpy(&g_tooltip.border, &a->pix.border, sizeof(Border));
+ }
+ else if (strcmp (key, "tooltip_font_color") == 0) {
+ extract_values(value, &value1, &value2, &value3);
+ get_color(value1, g_tooltip.font_color.color);
+ if (value2) g_tooltip.font_color.alpha = (atoi (value2) / 100.0);
+ else g_tooltip.font_color.alpha = 0.1;
+ }
+ else if (strcmp (key, "tooltip_font") == 0) {
+ if (g_tooltip.font_desc) pango_font_description_free(g_tooltip.font_desc);
+ g_tooltip.font_desc = pango_font_description_from_string(value);
+ }
+
+ /* Mouse actions */
+ else if (strcmp (key, "mouse_middle") == 0)
+ get_action (value, &mouse_middle);
+ else if (strcmp (key, "mouse_right") == 0)
+ get_action (value, &mouse_right);
+ else if (strcmp (key, "mouse_scroll_up") == 0)
+ get_action (value, &mouse_scroll_up);
+ else if (strcmp (key, "mouse_scroll_down") == 0)
+ get_action (value, &mouse_scroll_down);
+
+
+ /* Read tint-0.6 config for backward compatibility */
+ else if (strcmp (key, "panel_mode") == 0) {