Sorting buttons in eos-welcome

Hi there,
thanks @manuel a lot for straight up implementing my last suggestion!

Today I was wondering how eos-welcome sorts the buttons.

I remembered that eos-welcome uses yad, so the question is:
How does yad sort the buttons - if it does sort them at all?
I actually found out how it sorts them, but found it so unintuitive, I wanted to create a topic nevertheless:

So how does yad sort buttons?

When I looked into the yad manpage I found no field sorting, but noticed that my welcome page was actually sorted by entries. But weirdly so:
I have five entries, lets call them Button 1, 2, 3, 4 and 5.
Because I set columns to 2, it started filling the first column with entries / 2 rounded up and put the rest of the entries in column two like this:

Button 1 Button 4
Button 2 Button 5
Button 3

This makes sense, but is really unintuitive.
Now I was wondering:

And how do I align buttons in multiple columns then?

It’s certainly possible to “just” wrap your head around the yad sorting.

However, if you’re more of a visual person and dont want to fiddle around with the order until it is correct, I suggest the following:

  1. Open up sth. like LibreOffice Calc and put your buttons in there.
  2. Arrange them in the way you want eos-welcome to show them (dont forget your column setting).
  3. Now enter the buttons into the ~/.config/welcome-own-cmds.conf, starting at the top of the leftmost column, then the second column, and so on

That should be it, thanks for coming to my TED talk!

1 Like

@Numerfolt ,
I do not really get the point.

#!/bin/sh
yad --form \
  --no-buttons \
  --columns=2 \
  --rows=5 \
  --field="1 EOS  ":link http://www.endeavouros.com \
  --field="2 Forum":link http://forum.endeavouros.com \
  --field="3 Arch ":link https://wiki.archlinux.org/title/Main_page \
  --field="4 BBC  ":link https://www.bbc.com/news \
  --field="5 EnOS ":link http://www.endeavouros.com \
  --field="6 Wiki ":link https://wiki.archlinux.org/title/Main_page

My point is, that the yad button sorting is unintuitive.
And because I thought that some other persons may find it unintuitive, I wanted to create a topic that explains it.

If I want to show Arch and EOS from your example in the same row, I have to know how yad actually sorts those buttons. And because it doesnt say that in the manual, I thought I’d share how it works :person_shrugging: