субота, 6 жовтня 2012 р.

Making your Mac fit


So today I again started my morning staring at how Spotlight indexes my Mac again, condemning all other apps, including my precious IDEA to lag. Something ought to be done by this. Lion is so full of bullshit.

So here are few things I've done to make my life faster and with less shit around.

First I wanted to disable Spotlight. I found that I can replace it with QuickSilver (http://qsapp.com/)

QS is just a better Spotlight, with much more control over what happening behind the scenes on your Mac. From start it defaults to searching only application, which is just what I want from this kind of applications..

To seamlessly replace Spotlight with it, you need to disable the latter:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

In case you will want it back, you can reenable it with

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

I hope this day will never happen.

Now you've got ^+Space combination freed, and you can reassign default QS shortcut to be just that. With a little bit more effort, you can hide QS from Dock and Menubar, so it will be totally ubiquitous, showing up to you only when you need it and not disturbing otherwise.

The only last thing is something should be done with Spotlight icon in Menubar and having power of google it's easy:

sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search

Next, you kill a process called SystemUIServer to refresh the menubar and have the change take effect:

killall SystemUIServer

Getting the Spotlight icon back is a matter of bringing the permissions back to their default setting:

sudo chmod 755 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search

Follow this up with killing the SystemUIServer again:

killall SystemUIServer

So that's it and now you don't have to wait seconds until you run some application you need right now, just because Spotlight is very busy doing it's important indexing.

The next thing I wanted to get rid of is a Dashboard. This just pisses me off when I press F12 accidentally and it goes up in the hottest moment driving me nuts.

With just a couple of simple terminal commands you can be rid of the Dashboard forever.

defaults write com.apple.dashboard mcx-disabled -boolean YES

killall Dock

Not only this will give you back your CPU cycles, RAM and precious keyboard shortcut, but also remove the annoyance of getting Dashboard at the most unpleasant moment.

If you think you've made a biggest mistake in your life doing the above, you can aways get that piece of crap back with reverting the setting

defaults write com.apple.dashboard mcx-disabled -boolean NO

killall Dock

And yes, finally I did empty my Trash ;)

So far so good, it's not the best optimizations, however my day to day work will be with much less trouble.

Thanks to:

[1] http://osxdaily.com/2011/12/10/disable-or-enable-spotlight-in-mac-os-x-lion/
[2] http://osxdaily.com/2011/12/12/hide-spotlight-menu-icon-mac-os-x-lion/
[3] http://www.psyion.net/tutorials/3751