You are not logged in.

#1 2025-08-01 17:18:08

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

SOLVED! (kinda) syntax for yad to use --css=[string] properly?

So yad in it's man page has as one of it's options, a modifier to use css directly in creating a dialog.

--css=[string] , where string can be either a link to a css file, or css commands directly as the string.

But for the life of me I can't figure out the syntax it wants, and there's zero documentation to be found about it other than the one mention in the man page.

I have tried a lot of different combos, direct, quoted, curly brackets+conventional markup, etc. etc. and nothing seems to work. I'm sure it's something simple, but it's escaping me at the moment. I don't want to use an outboard css file for this, it's just one command I need to work, using the line-height property to put some space between lines of text in a paragraph.

Anybody have a clue?

Last edited by greenjeans (2025-08-01 19:59:34)

Offline

#2 2025-08-01 18:00:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: SOLVED! (kinda) syntax for yad to use --css=[string] properly?

^ I think @sleekmason explained it in more detail here:
    https://forums.bunsenlabs.org/viewtopic … 17#p119117

sleekmason wrote:

Example of where/how to place GTK_THEME="alt-dialog" in the script.

GTK_THEME="alt-dialog" \
yad --title "Conky" --button=gtk-close:1 --form --center --width=230 \

If people would know how little brain is ruling the world, they would die of fear.

Offline

#3 2025-08-01 18:34:07

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: SOLVED! (kinda) syntax for yad to use --css=[string] properly?

^^ That's a great thread and a lovely way to change the dialog. But i'm not looking to add an outboard css file for yad, just need to change this one dialog a bit (and possibly others in the future) and was hoping someone knew the syntax for a simple inline bit of css just for that specific dialog.

I could split the paragraph sentences with newlines, but's that's overkill and would look bad for such a small paragraph.

Here's the dialog if that helps:

yad --form --fixed --center --window-icon=audio-speakers --borders=20 \
    --title="Vuu-do Stream Recorder" \
    --text="This utility will record the radio stream currently playing in Vuu-do Simple Music Player.\nIt will continue to record that particular stream even if you switch stations in the player.\nTo record a different stream, you must stop the current recording and close this app.\nRecordings are saved to ~/Music.\n" \
    --field="Recording Mode":CB 'Split and Name Tracks!One Long File' \
    --button="Start Recording:0" \
    --button="Cancel:1" \
    --width=400 --height=200 \
    --on-top

Offline

#4 2025-08-01 19:58:50

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: SOLVED! (kinda) syntax for yad to use --css=[string] properly?

Got it fixed, but not with inline css, pango worked though!

Offline

#5 2025-08-02 01:06:28

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,547
Website

Re: SOLVED! (kinda) syntax for yad to use --css=[string] properly?

(There's no guarantee that everything in the yad manual works as expected.)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#6 2025-08-02 21:49:29

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: SOLVED! (kinda) syntax for yad to use --css=[string] properly?

johnraff wrote:

(There's no guarantee that everything in the yad manual works as expected.)

For sure. And i'm no conky expert so I was and am still wondering if it can be made to work inline, seems like it would be a handy copy-pasta  when you're making a number of dialogs for something and just want to throw up some skeletons to start, rather than having to type in pango commands in every text section.

Offline

Board footer

Powered by FluxBB