window-title: implement window-title command line argument

When -t or --window-title is supplied, its required argument is treated as a
format string where `%o` is replaced by the `wlr-output`'s `name` when we set
the window title.

This uses glib to split and join the format string because our own
`string-helpers` library only has `str_join`. Otherwise using `string-helpers`
would have been preferred.
This commit is contained in:
massi 2026-05-11 16:39:22 -07:00 committed by Johan Malm
parent 7a53f294a8
commit df6dde131f
3 changed files with 19 additions and 8 deletions

View file

@ -315,6 +315,8 @@ struct server {
struct sfdo *sfdo;
pid_t primary_client_pid;
char *window_title_fmt;
};
/* defined in main.c */