Open fearlessgeekmedia opened 1 year ago
Ubuntu 22.10 has yad version 0.40.0 which does happen to have this working.
Use --progress instead of --multi-progress
Sun, 04 Dec 2022 10:24:06 -0800 Michael Williams @.***> написав:
For example, if I copy this from https://smokey01.com/yad
eval exec yad --title="xdf" --image=drive-harddisk --text="Disk\ usage:" --buttons-layout=end --width=650 --multi-progress \ $(df -hT $1 | tail -n +2 | awk '{printf "--bar=\"%s (%s - %s) [%s/%s]\" %s ", $7, $1, $2, $4, $3, $6}')
It does not give me the expected results.
-- wbr Victor Ananjevsky @.***>
Even if it's a window where you want multiple progress bars?
yes
Oh, ok. All of the documentation I'm finding on the internet has --multi-progress, which I guess is not part of the newer versions. Thank you for that info.
OK, I tried ./yad --progress --progress-text="test1" --progress --progress-text="test2"
but only the second progress bar with "test2" showed up. So doing multiple progress bars in one window doesn't seem to work, unless I'm doing something wrong here.
Ah, I figured it out. I just use --bar like I would have as if it were using --multi-progress in older versions.
I've the same. In fact, a default single bar is displayed before the others, which creates a shift. It's very clear with this example:
HD_LIST=$(df -hT $1 | tail -n +2 | awk '{printf "--bar=\"<b>%s</b> ( %s ) <b>%s</b>\" %s% ", $3, $1, $7, $6}')
eval exec yad --image=drive-harddisk --text="Disk usage" --width=650 --progress \
${HD_LIST[*]}
the first ghost bar is the default single, then come the others. It's very clear when you launch df -hT
separatly.
For example, if I copy this from https://smokey01.com/yad
eval exec yad --title="xdf" --image=drive-harddisk --text="Disk\ usage:" --buttons-layout=end --width=650 --multi-progress \ $(df -hT $1 | tail -n +2 | awk '{printf "--bar=\"%s (%s - %s) [%s/%s]\" %s ", $7, $1, $2, $4, $3, $6}')
It does not give me the expected results.