MochiMoppel wrote: ↑Sun Jul 17, 2022 8:05 ammisko_2083 wrote: ↑Sun Jul 17, 2022 5:22 amIt can select multiple columns as well:
Code: Select all
P="8 9 a b c d e f" for a in $P ;do for b in $P;do for c in $P;do COLORS=$COLORS"#$a$b$c|<span font='24' bgcolor='#$a$b$c'> <span font='12' fgcolor='#000'>text</span><span font='12' fgcolor='#fff'>text</span> </span>|FALSE|<big><tt>#$a$b$c</tt></big>|" done;done;done IFS=\| yad --list --separator= --no-rules-hint --column=dummy --column='512 Pastell Colors' --column=Pick:CHK --column=Values $COLORS --hide-column=1 --print-all --geometry=320x600 | awk '/TRUE/{print substr($1,1,4)}'
Less "awk"ward :
Code: Select all
#!/bin/ash P='8 9 a b c d e f' for a in $P ;do for b in $P;do for c in $P;do COLORS=$COLORS"|#$a$b$c|<span font='24' bgcolor='#$a$b$c'> <span font='12' fgcolor='#000'>text</span><span font='12' fgcolor='#fff'>text</span> </span>|<big><tt>#$a$b$c</tt></big>|" done;done;done IFS=\| yad --list --checklist --separator= --no-rules-hint --column= --column=dummy --column='512 Pastell Colors' --column=Values $COLORS --hide-column=2 --print-column=2 --geometry=330x600
Yes awk-ward-less
For some reason it feels more comfortable to place the check button it in the middle.
^Previous script.