1
0
Fork 0
mirror of https://github.com/swaywm/sway.git synced 2025-03-17 12:04:27 +00:00

Allow using security context properties in title_format

This commit is contained in:
Puck Meerburg 2022-08-07 10:12:51 +00:00
parent 3611d1e245
commit 0c1cb35a42
2 changed files with 10 additions and 0 deletions

View file

@ -362,6 +362,10 @@ set|plus|minus|toggle <amount>
%instance - The X11 instance (applicable to xwayland windows only) ++ %instance - The X11 instance (applicable to xwayland windows only) ++
%shell - The protocol the window is using (typically xwayland or %shell - The protocol the window is using (typically xwayland or
xdg_shell) xdg_shell)
%sandbox_app_id - The app ID of this window, as passed in by the
sandboxing engine (this may differ from %app_id)
%sandbox_engine - The name of the engine that the client of this
window is sandboxed with
This command is typically used with *for_window* criteria. For example: This command is typically used with *for_window* criteria. For example:

View file

@ -1259,6 +1259,12 @@ static size_t parse_title_format(struct sway_view *view, char *buffer) {
} else if (strncmp(next, "%app_id", 7) == 0) { } else if (strncmp(next, "%app_id", 7) == 0) {
len += append_prop(buffer, view_get_app_id(view)); len += append_prop(buffer, view_get_app_id(view));
format += 7; format += 7;
} else if (strncmp(next, "%sandbox_app_id", 15) == 0) {
len += append_prop(buffer, view_get_sandbox_app_id(view));
format += 15;
} else if (strncmp(next, "%sandbox_engine", 15) == 0) {
len += append_prop(buffer, view_get_sandbox_engine(view));
format += 15;
} else if (strncmp(next, "%class", 6) == 0) { } else if (strncmp(next, "%class", 6) == 0) {
len += append_prop(buffer, view_get_class(view)); len += append_prop(buffer, view_get_class(view));
format += 6; format += 6;