Implement title alignment

This adds support for `i3 4.16`'s ability to set the title alignment.
The command is `title_align left|center|right`.

When the title is on the right, marks are moved to the left. Otherwise,
they are on the right.
This commit is contained in:
Brian Ashworth 2018-11-25 22:08:58 -05:00
parent 91bbb2a7dd
commit e6562c8cd2
8 changed files with 126 additions and 21 deletions

View file

@ -172,6 +172,7 @@ sway_cmd cmd_swaybg_command;
sway_cmd cmd_swaynag_command;
sway_cmd cmd_swap;
sway_cmd cmd_tiling_drag;
sway_cmd cmd_title_align;
sway_cmd cmd_title_format;
sway_cmd cmd_titlebar_border_thickness;
sway_cmd cmd_titlebar_padding;

View file

@ -357,6 +357,12 @@ enum mouse_warping_mode {
WARP_CONTAINER
};
enum alignment {
ALIGN_LEFT,
ALIGN_CENTER,
ALIGN_RIGHT
};
/**
* The configuration struct. The result of loading a config file.
*/
@ -409,6 +415,7 @@ struct sway_config {
bool validating;
bool auto_back_and_forth;
bool show_marks;
enum alignment title_align;
bool tiling_drag;
bool smart_gaps;