Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,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 whoever posted them. This site is not responsible for what they say.
10.5: Remove the Spotlight menu bar icon
Authored by: deibhaid on Jan 30, '09 03:00:33PM

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.

if [ -f /System/Library/LaunchAgents/Spotlight.disabled ]
then sudo chmod 644 /System/Library/LaunchAgents/
sudo chmod -R 755 /System/Library/CoreServices/
sudo rm /System/Library/LaunchAgents/Spotlight.disabled
echo "enabled"
else sudo chmod 0 /System/Library/LaunchAgents/
sudo chmod -R 0 /System/Library/CoreServices/
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"

[ Reply to This | # ]