OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: jgraves on April 11, 2004, 10:10:00 am

Title: Screen Blanking Applet
Post by: jgraves on April 11, 2004, 10:10:00 am
All,

Often, I like to blank the screen on my Z without doing a suspend.  I use this when I run xmms for music and don\'t want to waste battery on the
screen.

So, I wrote a simple applet based on the xterm-wrapper.sh

mb-applet-xset-wrapper.sh
---------------------
#!/bin/sh

# This just wraps xset command to blank the screen
# It tries /usr/X11R6/bin first, then /usr/bin, then simply uses the path
#

if [ -x /usr/X11R6/bin/xset ]; then
   /usr/X11R6/bin/xset s blank;
   exec /usr/X11R6/bin/xset s activate;
else
   if [ -x /usr/bin/xset ]; then
      /usr/bin/xset s blank;
      exec /usr/bin/xset s activate;
   else
      xset s blank;
      exec xset s activate;
   fi
fi
---------------------
Then I put this line in my
/home/root/.matchbox/mbdock.session file
mb-applet-launcher -o -1 -l figment.png mb-applet-xset-wrapper.sh
Note: You\'ll want to do this with X stopped.  Then startx.
Anyone tell me how I can setup the menu-]Utilities-]Panel to include
this applet?

Now just tap the light bulb to turn off the screen.  If someone has
a better icon, let me know.

-John