Hide Dashboard when controlling Front Row with Remote?

AppleWatcher

Tigerrr
I've just received my new Mac mini and I placed it in the living room.
I thought it would be nice to show Dashboard after some time, to show the time and the actual weather, etc. (you can find some scripts for that @ macosxhints.com).
But when I access Front Row with the Apple Remote, while Dashboard is activated, Dashboard doesn't hide until you 'exit' Front Row and show it again.. Is it possible to hide Dashboard when you control Front Row with the Apple Remote, or configure Dashboard so that it doesn't show up if Front Row is active?
 
Maybe you can alter those scripts you're using? Something like "don't do anything if FrontRow is front-most application" or something...
 
Brilliant idea. It works!
Here is the code:

Main script (from here), you have to convert this to an application with Automator and start this after login:
dashsaver.sh
Code:
#!/bin/bash

DOREPEAT=1
IDLECOMP=1
IDLE=900
WAIT=60

if [ $# -eq 2 ]
  then let IDLE="$1"; let WAIT="$2"
fi

while [ $DOREPEAT ]; do
  idleTime=`ioreg -c IOHIDSystem | awk '/HIDIdleTime/ {print int($NF/1000000000); exit}'`
  if [ $IDLECOMP = 1 ]
    then if [ $idleTime -ge $IDLE ]
      then let IDLECOMP=0; osascript 'launch db.scpt'
    fi
  else
    if [ $idleTime -lt $IDLE ]
      then let IDLECOMP=1
    fi
  fi
  sleep $WAIT
done

And, of course, the AppleScript that checks the frontmost process:
launch db.scpt
Code:
tell application "System Events"
	set frontapp to get name of 1st process whose frontmost is true
end tell
if frontapp is not "Front Row" then tell application "Dashboard" to launch

Maybe this is nice to place on macnews.net.tc? I think there are a lot of people that would like to have this script for their mac mini mediacentre :D
 
Back
Top