Optionally add focused window title to the bar

Add a "window_title yes|no" bar command that displays the title of the
focused window on the bar.
This commit is contained in:
Pedro Côrte-Real 2019-08-17 19:38:14 +01:00
parent 8441711990
commit 8a019a83c9
10 changed files with 131 additions and 1 deletions

View file

@ -221,6 +221,7 @@ sway_cmd bar_cmd_tray_padding;
sway_cmd bar_cmd_unbindcode;
sway_cmd bar_cmd_unbindsym;
sway_cmd bar_cmd_wrap_scroll;
sway_cmd bar_cmd_window_title;
sway_cmd bar_cmd_workspace_buttons;
sway_cmd bar_colors_cmd_active_workspace;

View file

@ -271,6 +271,7 @@ struct bar_config {
bool strip_workspace_name;
bool binding_mode_indicator;
bool verbose;
bool window_title;
struct side_gaps gaps;
int status_padding;
int status_edge_padding;

View file

@ -34,10 +34,12 @@ struct swaybar_config {
char *mode;
char *hidden_state;
char *modifier;
char *title;
bool strip_workspace_numbers;
bool strip_workspace_name;
bool binding_mode_indicator;
bool wrap_scroll;
bool window_title;
bool workspace_buttons;
list_t *bindings;
struct wl_list outputs; // config_output::link
@ -51,6 +53,7 @@ struct swaybar_config {
int bottom;
int left;
} gaps;
uint64_t window_app_id;
struct {
uint32_t background;