labwc/include/window-rules.h
Johan Malm d37e705548 window-rules: support title criteria
Example config:

    <windowRules>
      <windowRule identifier="foot" title="max">
        <action name="Maximize"/>
      </windowRule>
    </windowRules>

Observe that:

- `foot -T foo` starts maximized
- `xterm -T foo` starts normal
2023-05-10 21:21:34 +01:00

38 lines
785 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __WINDOW_RULES_H
#define __WINDOW_RULES_H
enum window_rule_event {
LAB_WINDOW_RULE_EVENT_ON_FIRST_MAP = 0,
};
enum property {
LAB_PROP_UNSPECIFIED = 0,
LAB_PROP_UNSET,
LAB_PROP_FALSE,
LAB_PROP_TRUE,
};
/*
* 'identifier' represents:
* - 'app_id' for native Wayland windows
* - 'WM_CLASS' for XWayland clients
*/
struct window_rule {
char *identifier;
char *title;
enum window_rule_event event;
struct wl_list actions;
enum property server_decoration;
struct wl_list link; /* struct rcxml.window_rules */
};
struct view;
void window_rules_apply(struct view *view, enum window_rule_event event);
enum property window_rules_get_property(struct view *view, const char *property);
#endif /* __WINDOW_RULES_H */