4 ms·
Those AppleScripts sound interesting -- mind sharing a link to more info?
by nzadrozny 16y ago
Those AppleScripts sound interesting -- mind sharing a link to more info?
- ddinch 16y agoI, too, would like to see these AppleScripts!
- danilocampos 16y agoThey're nothing special, and I can quote them right here if you like: To mount a partition: do shell script "diskutil mount PARTITION_UUID" Where PARTITION_UDID is the partition's UUID as returned by diskutil's info command. To unmount all partitions: try do shell script "diskutil unmount PARTITION_UUID" end try try do shell script "diskutil unmount NEXT_PARTITION_UUID" end try The try is there in case one partition is mounted and another isn't – won't throw an error in those cases. Just compile those as self-contained apps, drop them in your dock and you're good to go. It's pretty manual stuff, I have to remember to launch the appropriate script at the beginning and end of a task that involves the HDD, but it's not much of a problem, since I don't use it that often. Meanwhile, you get a silent MBP, with a smidge better battery life, since the HDD isn't spinning needlessly. Looking into auto-mounting the partition when a symlink is accessed, got a SuperUser question going here: http://superuser.com/questions/228028/mount-drive-when-symbolic-link-is-accessed/ http://superuser.com/questions/228028/mount-drive-when-symbo...
- jckarter 16y agoThere's actually a dedicated Script menu available in the OS. Instead of deploying .apps and taking up space in the Dock, you can start up AppleScript Editor and check "Show Script menu in menu bar" in its Preferences. Then place your scripts in ~/Library/Scripts (or ~/Library/Scripts/Applications/<application name> to have them only appear while a certain application is active).
- nzadrozny 16y ago> Looking into auto-mounting the partition when a symlink is accessed Ah, see now that's what I imagined would be going on here ;) From your SuperUser question it looks like there's a service called, appropriately enough, automountd. Neat! Is there no end to Unix's little undiscovered gems? Some docs: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/autofs.conf.5.html http://developer.apple.com/library/mac/#documentation/Darwin... A decent tutorial-style blog article: http://rajeev.name/2007/11/22/autofs-goodness-in-apples-leopard-105-part-i/ http://rajeev.name/2007/11/22/autofs-goodness-in-apples-leop... (My new SSD shows up on Wednesday!)