fix indentation to use tabs

This commit is contained in:
Sebastien Lavoie-Courchesne 2026-03-07 20:20:49 -05:00
parent e445fc1344
commit 85f0a101c3
8 changed files with 13 additions and 11 deletions

View file

@ -30,7 +30,7 @@ static const struct cmd_handler bar_handlers[] = {
{ "strip_workspace_numbers", bar_cmd_strip_workspace_numbers }, { "strip_workspace_numbers", bar_cmd_strip_workspace_numbers },
{ "tray_bindcode", bar_cmd_tray_bindcode }, { "tray_bindcode", bar_cmd_tray_bindcode },
{ "tray_bindsym", bar_cmd_tray_bindsym }, { "tray_bindsym", bar_cmd_tray_bindsym },
{ "tray_last", bar_cmd_tray_last }, { "tray_last", bar_cmd_tray_last },
{ "tray_output", bar_cmd_tray_output }, { "tray_output", bar_cmd_tray_output },
{ "tray_padding", bar_cmd_tray_padding }, { "tray_padding", bar_cmd_tray_padding },
{ "unbindcode", bar_cmd_unbindcode }, { "unbindcode", bar_cmd_unbindcode },

View file

@ -172,7 +172,7 @@ struct bar_config *default_bar_config(void) {
#if HAVE_TRAY #if HAVE_TRAY
bar->tray_padding = 2; bar->tray_padding = 2;
bar->tray_last = true; bar->tray_last = true;
wl_list_init(&bar->tray_bindings); wl_list_init(&bar->tray_bindings);
#endif #endif

View file

@ -1469,7 +1469,7 @@ json_object *ipc_json_describe_bar_config(struct bar_config *bar) {
json_object_object_add(json, "tray_padding", json_object_object_add(json, "tray_padding",
json_object_new_int(bar->tray_padding)); json_object_new_int(bar->tray_padding));
json_object_object_add(json, "tray_last", json_object_new_boolean(bar->tray_last)); json_object_object_add(json, "tray_last", json_object_new_boolean(bar->tray_last));
#endif #endif
return json; return json;
} }

View file

@ -147,7 +147,7 @@ sway_sources = files(
'commands/bar/strip_workspace_name.c', 'commands/bar/strip_workspace_name.c',
'commands/bar/swaybar_command.c', 'commands/bar/swaybar_command.c',
'commands/bar/tray_bind.c', 'commands/bar/tray_bind.c',
'commands/bar/tray_last.c', 'commands/bar/tray_last.c',
'commands/bar/tray_output.c', 'commands/bar/tray_output.c',
'commands/bar/tray_padding.c', 'commands/bar/tray_padding.c',
'commands/bar/workspace_buttons.c', 'commands/bar/workspace_buttons.c',

View file

@ -169,7 +169,8 @@ ContextMenu|Activate|SecondaryActivate|ScrollDown|ScrollLeft|ScrollRight|ScrollU
for button3). for button3).
*tray_last* yes|no *tray_last* yes|no
Sets the tray icons to appear as the last element in the bar. If _no_, the tray will appear to the left of the status command. Default is _yes_. Sets the tray icons to appear as the last element in the bar. If _no_, the
tray will appear to the left of the status command. Default is _yes_.
*tray_padding* <px> [px] *tray_padding* <px> [px]
Sets the pixel padding of the system tray. This padding will surround the Sets the pixel padding of the system tray. This padding will surround the

View file

@ -78,7 +78,7 @@ struct swaybar_config *init_config(void) {
#if HAVE_TRAY #if HAVE_TRAY
config->tray_padding = 2; config->tray_padding = 2;
config->tray_last = true; config->tray_last = true;
wl_list_init(&config->tray_bindings); wl_list_init(&config->tray_bindings);
#endif #endif

View file

@ -308,9 +308,9 @@ static bool ipc_parse_config(
config->tray_padding = json_object_get_int(tray_padding); config->tray_padding = json_object_get_int(tray_padding);
} }
if ((json_object_object_get_ex(bar_config, "tray_last", &tray_last))) { if ((json_object_object_get_ex(bar_config, "tray_last", &tray_last))) {
config->tray_last = json_object_get_boolean(tray_last); config->tray_last = json_object_get_boolean(tray_last);
} }
struct tray_binding *tray_bind = NULL, *tmp_tray_bind = NULL; struct tray_binding *tray_bind = NULL, *tmp_tray_bind = NULL;
wl_list_for_each_safe(tray_bind, tmp_tray_bind, &config->tray_bindings, wl_list_for_each_safe(tray_bind, tmp_tray_bind, &config->tray_bindings,

View file

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