
86
|
Chapter 4, Related to X
#26 Never Miss Another Reminder
HACK
Green is typical of television on-screen displays, so see if it looks good for
XOSD:
$ echo "Hello there, this is osd_cat speaking." |
osd_cat_-c green \
–f "-adobe-helvetica-bold-r-normal-*-*-240-*-*-p-*-*-*"
If you want to get fancy, present the text with a bit of a shadow. Of course,
if the message displays on a dark background, you probably won’t see the
shadow. Add the
–s 2 switch to create a 2-pixel shadow for the message:
$ echo "Hello there, this is osd_cat speaking." |
osd_cat -c green –s 2 \
–f "-adobe-helvetica-bold-r-normal-*-*-240-*-*-p-*-*-*"
Now position the text in the middle of the screen with the -p middle switch
(you can choose
top or bottom, if you prefer). You might see the message
appear at the top of the screen for a moment, after which it shifts to the mid-
dle of the screen. This is an occasional idiosyncrasy of osd_cat that will
probably be fixed as it matures. Finally, you can make the message display
on the screen for longer than the default 5 seconds. Add the
-d 60 switch to
tell osd_cat to leave the message on the screen for 60 seconds:
$ echo "Hello there, this is osd_cat speaking." |
osd_cat -c green –s 2 –p middle –d 60
–f "-*-helvetica-*-*-*-*-34-*-*-*-*-*-*-*"
A number of other switches are also available, such as a switch to indent the
text. Browse the manpage for osd_cat for a list of the available customiza- ...