Best of OS X Hints
I’m a regular BarCamp attendee. As such I give presentations for some interested folks in some really special-interest areas – such as “Best of OS X Hints”.
This presentation was inspired by Rob Griffith, the original writer of macosxhints.com. He gave two presentations at Macworld where he presented his favorite OS X Hints. This is a follow up on his presentation. I’ve added some personal favorites and Lion hints.
Enjoy.
- Foreword (Alternatives to some of this stuff)
- "Best of Hints"
- "Go to Folder"
- ⇧⌘G in Finder
- ⇧⌘G in Open/Save dialogs too
- Auto-complete!
- Remap shortcut keys in System Preferences → Keyboard
- Useful for setting one shortcut in many apps the same. (e.g. Keynote, Pages and Numbers use ⌘E for “Export”)
- App switching tricks ⌘⇥
- App Switcher works as activator on hover
- ⌘Q (quit) and ⌘H (hide) work here
- Look Up in Dictionary
- triple-finger double-click
- dict.cc plugin
- More German Dictionary plugins
- Open files in (unsupported) Applications
- Hold ⌘⌥ when dragging a file to the icon in the Dock.
- Open files in Trash
- Login Window
- Login Window Information
- Click to cycle through Info
- Change permanently:
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
- Replace Hostinfo with:
SystemVersion
,SystemBuild
,SerialNumber
,IPAddress
,DSStatus
,Time
- Custom Text
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Hello There"
- Replace Hostinfo with:
- Change Background Image
- Rename
/System/Library/CoreServices/DefaultDesktop.jpg
toDefaultDesktop.jpg.bak
- Put a new image named DefaultDesktop.jpg in that folder
- or:
sudo defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture /Users/Shared/mynewbackground.jpg
- Login Window Information
- Spotlight
- ⌘-click to show in Finder
- AND, OR Searches
- space (between words) = AND
|
= OR-
= NOT → cat (-dog)
- Search for kind:
- Self speaking
kind:image
,kind:folder
,kind:pdf
- Spotlight as App Launcher
- Set nickname in Spotlight Comment (Get Info in Finder). For example: “gband” for GarageBand
- iPhoto
- Get back to original image temporarily by holding ⇧
- iTunes arrows shouldn’t point to the iTunes Store, but to the local library
defaults write com.apple.iTunes invertStoreLink -bool YES
- Mail: Force Plain Text
defaults write com.apple.mail PreferPlainText -bool TRUE
- Save dialogs always expanded
defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE
- "Go to Folder"
- Older OS X Hints:
- Enable Data Detectors in iChat
defaults write com.apple.iChat EnableDataDetectors 1
- Use Help to select menu items via keyboard
- ⌘? (⇧⌘/)
- Link to any specific message in Mail
- ⇧⌘H
- Search for:
Message-Id: <6a73er$6ut69e@outbound.icp-qv1-irony-out2.iinet.net.au>
- Add:
message://
- Use in iCal for link to open Mail with that message. (
message://<6a73er$6ut69e@outbound.icp-qv1-irony-out2.iinet.net.au>
- Banish the 3D dock from 10.5
defaults write com.apple.dock no-glass -boolean YES; killall Dock
- Use extra region capture screenshot options
- ␣ → Move Selection
- ⇧ → Lock x/y axis
- ⌥ → Resize selection from center
- Add a ‘recent things’ stack to the Dock
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; } && killall Dock;'
- 10.5: Search system folders in Spotlight
- Spotlight generally excludes OS X system folders (such as /etc and /bin) from its searches. But, if you know the name of the system folder you want to search, you can search in it anyway.
- For example, to search for a file in the /etc folder, select Go: Go to Folder in the Finder.
- Type /etc in the Go to field and click Go. With that folder now open in the Finder, type whatever it is you want to look for in the Finder window’s Spotlight field. When the Search bar appears, select “etc” as the folder to search (instead of This Mac). If you select one of the found files and check its file path at the bottom of the search window, you’ll see that the search results are indeed within one of those previously unsearchable folders.
- Include system files: click “+”, click “Kind”, then “Other…”. In the new window search for “system files”. Highlight it and click “OK”. Then just say Search for “System files” “are included”.
- Create a Shortcut to Save a PDF to a Folder
- 1: Open Finder.
- 2: Go to (Your Home Folder)/Library/PDF Services/
- 3: Open a new Finder window and go to the folder you want to save to (or the application you wish to open the PDF with.)
- 4: Drag the folder/app to the PDF Services folder, but, hold the command and option keys as you let go of the mouse. (This will create an alias to the folder/app inside the PDF Services folder.)
- 5: Create a keyboard shortcut for the name of the alias.
- Enable Data Detectors in iChat
- 10.7 Hints
- Shift modifier for fine volume control
- ⇧⌥ Volume Up or ⇧⌥ Volume Down
- Launchpad
- Remove all apps from Launchpad
sqlite3 ~/Library/Application\ Support/Dock/*.db "DELETE from apps; DELETE from groups WHERE title<>''; DELETE from items WHERE rowid>2;" && killall Dock
- Reset Launchpad
rm ~/Library/Application\ Support/Dock/*.db && killall Dock
- Remove all apps from Launchpad
- Key repeat :
defaults write -g ApplePressAndHoldEnabled -bool false
- Show
~/Library
chflags nohidden ~/Library
~/Documents
chflags hidden ~/Documents/foo
- Article on MOSX.Tumblr about regaining control of ~/Documents
- Enable AirDrop with Ethernet and on unsupported Macs
defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1
- Enable iTunes track notifications in the Dock
defaults write com.apple.dock itunes-notifications -bool TRUE;killall Dock
- Select and copy text within Quick Look previews
defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder
- Shift modifier for fine volume control
- OSX For Hackers
Personal favorites
- Getting pictures out of .doc documents
- Save .doc as HTML (in TextEdit!)
- Save .doc as RTFD
Fast User Switch
set username to name of (info for (path to me))
set AppleScript's text item delimiters to (".")
set username to first text item of username
set AppleScript's text item delimiters to ""
set username to do shell script "/usr/bin/id -u " & username
do shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -switchToUserID " & username
Uncrush iOS PNG’s
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -dir targetfolder -revert-iphone-optimizations -q sourceimageswildcard.png
TimeMachine backup interval: Open
/System/Library/LaunchDaemons/com.apple.backupd-auto.plist
<key>StartInterval</key>
<integer>3600</integer>
Network Link Conditioner:
- Xcode → Xcode menu → Open Developer Tool → More Developer Tools… → IO Tools for Xcode
- Preview man pages in Preview. Add this function to .profile or .bash_rc:
pman () { man -t "${1}" | open -f -a /Applications/Preview.app }
- cd to foreground Finder window. (Two functions!)
function ff { osascript -e 'tell application "Finder"'\ -e "if (${1-1}
- Getting pictures out of .doc documents