mirror of
https://github.com/labwc/labwc.git
synced 2026-04-13 08:21:15 -04:00
Window switch, add custom field, with printf style config
based on work by Consolatis. I added documentation, examples and repackaged.
This commit is contained in:
parent
11b6836a38
commit
6311b3ac6a
5 changed files with 202 additions and 45 deletions
|
|
@ -216,9 +216,13 @@ fill_window_switcher_field(char *nodename, char *content)
|
|||
current_field->content = LAB_FIELD_TYPE_SHORT;
|
||||
} else if (!strcmp(content, "output")) {
|
||||
current_field->content = LAB_FIELD_OUTPUT;
|
||||
} else if (!strcmp(content, "custom")) {
|
||||
current_field->content = LAB_FIELD_CUSTOM;
|
||||
} else {
|
||||
wlr_log(WLR_ERROR, "bad windowSwitcher field '%s'", content);
|
||||
}
|
||||
} else if (!strcmp(nodename, "format")) {
|
||||
current_field->format = xstrdup(content);
|
||||
} else if (!strcmp(nodename, "width") && !strchr(content, '%')) {
|
||||
wlr_log(WLR_ERROR, "Removing invalid field, %s='%s' misses"
|
||||
" trailing %%", nodename, content);
|
||||
|
|
@ -1635,6 +1639,7 @@ rcxml_finish(void)
|
|||
struct window_switcher_field *field, *field_tmp;
|
||||
wl_list_for_each_safe(field, field_tmp, &rc.window_switcher.fields, link) {
|
||||
wl_list_remove(&field->link);
|
||||
zfree(field->format);
|
||||
zfree(field);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue