diff --git a/sway/sway.5.scd b/sway/sway.5.scd index 4def2cbb1..11468d777 100644 --- a/sway/sway.5.scd +++ b/sway/sway.5.scd @@ -372,12 +372,29 @@ set|plus|minus|toggle *title_format* Sets the format of window titles. The following placeholders may be used: - %title - The title supplied by the window ++ - %app_id - The wayland app ID (applicable to wayland windows only) ++ - %class - The X11 classname (applicable to xwayland windows only) ++ - %instance - The X11 instance (applicable to xwayland windows only) ++ - %shell - The protocol the window is using (typically xwayland or - xdg_shell) + *%title* + The title supplied by the window + + *%app_id* + The wayland app ID (applicable to wayland windows only) + + *%class* + The X11 classname (applicable to xwayland windows only) + + *%instance* + The X11 instance (applicable to xwayland windows only) + + *%shell* + The protocol the window is using (typically xwayland or xdg_shell) + + *%sandbox_engine* + The associated sandbox engine + + *%sandbox_app_id* + The app ID provided by the associated sandbox engine + + *%sandbox_instance_id* + The instance ID provided by the associated sandbox engine This command is typically used with *for_window* criteria. For example: diff --git a/sway/tree/container.c b/sway/tree/container.c index 0288beacb..6ff4036fa 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -716,6 +716,15 @@ size_t parse_title_format(struct sway_container *container, char *buffer) { } else if (has_prefix(next, "%shell")) { len += append_prop(buffer, view_get_shell(container->view)); format += strlen("%shell"); + } else if (has_prefix(next, "%sandbox_engine")) { + len += append_prop(buffer, view_get_sandbox_engine(container->view)); + format += strlen("%sandbox_engine"); + } else if (has_prefix(next, "%sandbox_app_id")) { + len += append_prop(buffer, view_get_sandbox_app_id(container->view)); + format += strlen("%sandbox_app_id"); + } else if (has_prefix(next, "%sandbox_instance_id")) { + len += append_prop(buffer, view_get_sandbox_instance_id(container->view)); + format += strlen("%sandbox_instance_id"); } else { lenient_strcat(buffer, "%"); ++format;