mirror of
https://github.com/swaywm/sway.git
synced 2025-11-04 13:29:52 -05:00
Implement title_format
This implements the title_format command, with a new placeholder %shell
which gets substituted with the view type (xwayland, xdg_shell_v6 or
wl_shell).
Example config:
for_window [title=".*"] title_format %title (class=%class instance=%instance shell=%shell)
This commit is contained in:
parent
8dae168b77
commit
228c478e8d
10 changed files with 201 additions and 42 deletions
|
|
@ -48,6 +48,7 @@ struct sway_view {
|
|||
|
||||
bool is_fullscreen;
|
||||
|
||||
char *title_format;
|
||||
enum sway_container_border border;
|
||||
int border_thickness;
|
||||
|
||||
|
|
@ -164,6 +165,8 @@ const char *view_get_class(struct sway_view *view);
|
|||
|
||||
const char *view_get_instance(struct sway_view *view);
|
||||
|
||||
const char *view_get_type(struct sway_view *view);
|
||||
|
||||
void view_configure(struct sway_view *view, double ox, double oy, int width,
|
||||
int height);
|
||||
|
||||
|
|
@ -207,4 +210,11 @@ void view_child_init(struct sway_view_child *child,
|
|||
|
||||
void view_child_destroy(struct sway_view_child *child);
|
||||
|
||||
/**
|
||||
* Re-read the view's title property and update any relevant title bars.
|
||||
* The force argument makes it recreate the title bars even if the title hasn't
|
||||
* changed.
|
||||
*/
|
||||
void view_update_title(struct sway_view *view, bool force);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue