swaybar: add option to show tray left of status

This commit is contained in:
Sebastien Lavoie-Courchesne 2026-03-01 17:55:50 -05:00
parent c57daaf0d1
commit 1b2e930cb9
12 changed files with 54 additions and 3 deletions

View file

@ -675,16 +675,23 @@ static uint32_t render_to_cairo(struct render_context *ctx) {
* utilize the available space.
*/
double x = output->width;
/* config->tray_last = false; */
#if HAVE_TRAY
if (bar->tray) {
if (bar->tray && config->tray_last) {
uint32_t h = render_tray(cairo, output, &x);
max_height = h > max_height ? h : max_height;
}
#endif
if (bar->status) {
if (bar->status) {
uint32_t h = render_status_line(ctx, &x);
max_height = h > max_height ? h : max_height;
}
#if HAVE_TRAY
if (bar->tray && !config->tray_last) {
uint32_t h = render_tray(cairo, output, &x);
max_height = h > max_height ? h : max_height;
}
#endif
x = 0;
if (config->workspace_buttons) {
struct swaybar_workspace *ws;