These are scripts that I use with FastScripts to extend functionality in Mac OS X applications.
I'm writing a series of blogs about them. This is what I've got so far:
-
Finder
- New Plain Text File ⌃⌘N
- Paste as symlink ⌥⌘V
- Edit in TextMate ⇧⌘E
- Make executable ⇧⌘X
- Copy Paths to Selected Items ⇧⌘C
-
iTunes
For a possibly more up-to-date list, see the fastscripts tag.
You need ruby 1.9 compiled as a universal binary, with rb-appscript installed. To check how your ruby is compiled:
$ file `which ruby`
If it doesn't say "universal binary", you need to build it yourself. Easiest is Homebrew:
$ brew install ruby --universal
To install rb-appscript:
$ gem install rb-appscript
If gem compilation fails and mentions homebrew-installed libxml2 or libsqlite3, try brew unlink sqlite libxml2
before gem installation. Afterwards, link them back with brew link sqlite libxml2
.
# preserve your old scripts, if any:
$ mv ~/Library/Scripts/ OldScripts
$ git clone git://github.com/kch/mac-user-scripts.git ~/Library/Scripts
$ cd ~/Library/Scripts/
$ rake
# now proceed to copy your old scripts from "OldScripts" back here
Scripts ran through FastScripts won't inherit the environment set in "/etc/profile", "/.bashrc" or similar scripts. If you need to set some environment variables, like "PATH", you should use "/.MacOSX/environment.plist". Example:
$ cat ~/.MacOSX/environment.plist
{
PATH = "/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin";
}
After editing the environment.plist file, you need to log out of your system account and log in again.