Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the '10.5: Remove the Spotlight menu bar icon' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
10.5: Remove the Spotlight menu bar icon
Authored by: deibhaid on Fri, Jan 30 2009 at 3:00PM PST
I wrote a little simple script that can be run to disable and enable Spotlight. It writes an empty file to keep track of whether it's disabled or enabled.

#!/bin/sh
if [ -f /System/Library/LaunchAgents/Spotlight.disabled ]
then sudo chmod 644 /System/Library/LaunchAgents/com.apple.Spotlight.plist
sudo chmod -R 755 /System/Library/CoreServices/Spotlight.app
sudo rm /System/Library/LaunchAgents/Spotlight.disabled
echo "enabled"
else sudo chmod 0 /System/Library/LaunchAgents/com.apple.Spotlight.plist
sudo chmod -R 0 /System/Library/CoreServices/Spotlight.app
sudo touch /System/Library/LaunchAgents/Spotlight.disabled
for i in $(ps aux | grep Spotlight | grep -v grep | awk '{print $2}');do kill -9 $i;done
echo "disabled"
fi


[ Reply to This | # ]