in kalarm, how to have a big window with advice?

I’m using kalarm (if you know another software I will try it) to have a loop advice every 5 or 10 mor 30 minutes and I would like to have a big red window with an advice opening at the timeout, I found this to insert in the “command line” field:
xterm -fg yellow -T “Wake Up” -g 40x10
I modified like this:
xterm -fg red -T “Wake Up” -g 160x10
but it is big but text is small and doesn’t show “wake up” text,
how can I have a big window, big “Lazarus, wake up and walk!” red text, and possibly yellow background??

manythanks, ciao, pier :slight_smile: :slight_smile:

The “-T” option only sets the window title, which will immediately be replaced by the current directory in openSUSE’s default setup.
Run echo inside the xterm e.g. to display a text:

xterm -fg red -g 160x10 -hold -e echo "Wake Up"

See also “man xterm”.
Not sure about the font size at the moment, you should be able to set it with some escape sequences (google for that).

Or use e.g. kdialog to display your messge. You can change the font size and color with standard HTML codes, e.g.:

kdialog --msgbox "<font size=+5 color=#f00>Wake Up</font>"

good, kdialog I like it!!, in kdialog man page I found something, but I cannot understand why:
background doesn’t change when I set --foreground “color=#green” or --background “color=#green” or “color=#FFFF00” or “#FFFF00” or many other unsuccessful tries
size of text doesn’t became bigger than +5 when I set font size=+15
with this command:
kdialog --background “color=#green” --msgbox “<font size=+15 color=red>Wake Up and drink</font>”
what I have to write to have a bigger text and a colored background??
manythanx, ciao, pier

Where did you find that --foreground or --background switches? "kdialog --help doesn’t mention them here…
Btw, “color=#green” wouldn’t make sense anyway, in HTML it’s either “#0F0”, “#00FF00”, or “green”.

size of text doesn’t became bigger than +5 when I set font size=+15

Well, there is no size 15 in HTML… The maximum is 7, and the actual size depends on the browser.

As menioned, kdialog more or less accepts arbitrary HTML as message text (although probably not every single HTML feature is supported or makes sense), so have a look at your favorite HTML tutorial.
CSS is supported too, btw, which allows to explicitely set the font size or background color.

what I have to write to have a bigger text and a colored background??

Something like this should do: (using CSS specified via the “style” attribute now)

kdialog --msgbox '<p style="font-size: 48pt; color: red; background-color: green">Wake Up</p>'

here and it says:

**Qt options:**

.....
***********--fn, --font* fontname*********************defines the application font.********************
--bg, **--background* color sets the default background color and an application palette (light and dark shades are calculated).**
--fg, **--foreground* color sets the default foreground color.******************
*

I will try your suggested code later…:slight_smile:
manythanx, ciao, pier

That’s the KDE3 version.
But you’re right, Qt4 does have the foreground and background options as well. But that doesn’t work with KDE applications as they use KDE’s color and font settings.
And even if it worked, you wouldn’t specify “color=xxx” as color, but rather just the color… :wink:

Anyway, just set the colors in the (HTML) text itself.

Btw, you can run “kdialog --help” to see the options of your version, or “kdialog --help-all” for all general KDE/Qt options as well.

I tested this:

kdialog --msgbox '<p style="font-size: 68pt; color: red; background-color: yellow">Wake Up and drink</p>'

it works well in konsole, but it doesn’t works in kalarm, the result is this:
http://paste.opensuse.org/view/download/58337218

following your suggestion I found another interesting option of kdialog:
–textbox [width] [height] Text Box dialog
I succeed in showing file content, but I canot give [width] and [height]
I tried in this way:

pla@suse-TW:~> kdialog --textbox /home/user/message1 [100] [20]
pla@suse-TW:~> kdialog --textbox /home/user/message1 [1000] [20]

but nothing change in size of textbox
how can I give width and height ???
manythanks, ciao, pier :slight_smile:

ok, this is solved writing this:

kdialog --msgbox "<p style='font-size: 68pt; color: red; background-color: yellow'>Wake Up and drink</p>"

manythanks again. :slight_smile:
:slight_smile:

yeah!! solved also this…:slight_smile:
the text file has to have inside the html code, so I made a text file /home/user/message1 with this inside:

"<p style='font-size: 68pt; color: red; background-color: yellow'>Wake Up and drink Lazarus</p>"

and the width and height has to be simply numbers…
so the command like this…:

kdialog --textbox /home/user/message1 1300 300

is very ok … :slight_smile:
:slight_smile: :slight_smile: :slight_smile:
manythanx, ciao, pier :slight_smile:

Yes. The square brackets mean that the parameters are optional and don’t have to be specified.
OTOH, you have to specify the <file> parameter, otherwise you’ll just get an error message .