[mythtv-users] Full screen time display, with screen on

Dave M G martin at autotelic.com
Thu Mar 3 13:24:09 UTC 2011


Brian,

Thanks for responding.

Okay, I've got something kind of working but with a few small issues.

Here is the script:

- - -
#!/bin/bash

STATUS=`xset -q | grep "Monitor is" | awk '{print $3}'`

if [ "${STATUS}" = "On" ]
then
   date +"%H:%M %m.%d.%Y" | tr " " "\n" | osd_cat --pos=middle
--align=centre --font='-*-lucida-bold-*-*-*-128-*-*-*-*-*-*-u';
else
   xdotool key shift;
   xset dpms force on;
   date +"%H:%M %m.%d.%Y" | tr " " "\n" | osd_cat --pos=middle
--align=centre --font='-*-lucida-bold-*-*-*-128-*-*-*-*-*-*-u';
sleep 5;
xset dpms force off
fi
exit 0
- - -

The problems:

1. Setting the font is an incredible hassle! It took me forever to
figure out that the only hope in this world of getting the right syntax
for font configuration to use the program "xfontsel", and even then, it
fails more than it works.

Right now, the font setting I have is literally the only one I could get
to work on my system. The Lucida font looks like crap, it's all jaggy
and pixelated, and it's red.

I'd really like to get a nice white Ubuntu font that is smooth.

However, this fails:
-*-ubuntu-bold-*-*-*-128-*-*-*-*-*-*-u


2. In the "else" case of the script above, I'd like for the time to
appear on a black background. There doesn't seem to be an option in
osd_cat for this. Is there another way to do that?

--
Dave M G


More information about the mythtv-users mailing list