config: support window switcher field definitions

<windowSwitcher>
  <fields>
    <field content="type" width="25%" />
    <field content="app_id" width="25%" />
    <field content="title" width="50%" />
  </fields>
</windowSwitcher>

Relates to issues #852 #855 #879
This commit is contained in:
Johan Malm 2023-04-19 14:44:41 +01:00 committed by Johan Malm
parent 36849eb7ef
commit 0f37c04df0
5 changed files with 198 additions and 34 deletions

View file

@ -11,6 +11,19 @@
#include "config/libinput.h"
#include "theme.h"
enum window_switcher_field_content {
LAB_FIELD_NONE = 0,
LAB_FIELD_TYPE,
LAB_FIELD_APP_ID,
LAB_FIELD_TITLE,
};
struct window_switcher_field {
enum window_switcher_field_content content;
int width;
struct wl_list link; /* struct rcxml.window_switcher.fields */
};
struct rcxml {
char *config_dir;
@ -65,6 +78,10 @@ struct rcxml {
/* Regions */
struct wl_list regions; /* struct region.link */
struct {
struct wl_list fields; /* struct window_switcher_field.link */
} window_switcher;
};
extern struct rcxml rc;