mirror of
https://github.com/swaywm/sway.git
synced 2026-03-22 05:34:04 -04:00
swaybar: do not create tray if hidden
This commit is contained in:
parent
2fd41fe9c8
commit
f33b5c5223
4 changed files with 6 additions and 2 deletions
|
|
@ -371,7 +371,9 @@ bool bar_setup(struct swaybar *bar, const char *socket_path) {
|
|||
assert(pointer->cursor_surface);
|
||||
|
||||
#if HAVE_TRAY
|
||||
bar->tray = create_tray(bar);
|
||||
if (!bar->config->tray_hidden) {
|
||||
bar->tray = create_tray(bar);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bar->config->workspace_buttons) {
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ static bool ipc_parse_config(
|
|||
json_object *o = json_object_array_get_idx(tray_outputs, i);
|
||||
list_add(config->tray_outputs, strdup(json_object_get_string(o)));
|
||||
}
|
||||
config->tray_hidden = strcmp(config->tray_outputs->items[0], "none") == 0;
|
||||
}
|
||||
|
||||
if ((json_object_object_get_ex(bar_config, "tray_padding", &tray_padding))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue