When Lion was released I was excited about the idea of Launchpad. After upgrading however, I found that Launchpad had hundreds of apps listed. Everything in my Applications folder was be displayed with no way of removing them. This included all the uninstallers and other useless apps that I did not want cluttering up my Launchpad. After a little research I found that you could remove applications from terminal with a fairly simple command:
sqlite3 ~/Library/Application\ Support/Dock/*.db "DELETE from apps WHERE title='APPNAME';" && killall Dock
This was great but with hundreds of apps that I wanted to remove it seemed to be a daunting task. I eventually gave up and stopped using Launchpad.
When Mountain Lion was released I took the opportunity to clean house and did a clean install. This cleared up my Launchpad problem very nicely but I still had a few apps that I just did not want displayed. After using the terminal command above a few times I decided to automate the process (if you have to do something twice, it’s time to automate it).
Using Automator I created an app that prompts me for an app name and then removes it from Launchpad using the terminal command.
The tricky part here is using a variable in a shell script. After some research I found that
$@ is used in the shell script to call the variable created.