v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
654 stars 58 forks source link

[feature request] `--list` column alignment? (and maybe a bug) #204

Open elder-n00b opened 1 year ago

elder-n00b commented 1 year ago

I think it would be nice to have a way to align a column text (not necessarily numeric) in the --list widget. If there's a way to achieve it I missed it. Not sure if it would better be some annotation on the column name (I see !something is used elsewhere for this), or a command line option like the --*-column (or --wrap-cols that takes a list) that already exist. Maybe --align-right-column and --align-center-column? (all of them consistently being --*-columns and taking a list would be nice, but also a breaking change)


By the way, it seems to me that the alignment for --column=name:NUM does not work properly: the numbers end up left-aligned between themselves and then right aligned together in the column.

example: printf "1\nfirst\n123\nsecond\n" |yad --list --column=id:NUM --column=name

expected:

|id      |name    |
|       1|first   |
|     123|second  |

instead:

|id      |name    |
|     1  |first   |
|     123|second  |
v1cont commented 1 year ago

nice idea, added in a98f6f9