Negative Space: macOS tricks
- 42 Astoundingly Useful Scripts and Automations for the Macintosh
- MacOS uses Perl, Python, AppleScript, and Automator and you can write scripts in all of these. Build a talking alarm. Roll dice. Preflight your social media comments. Play music and create ASCII art. Get your retro on and bring your Macintosh into the world of tomorrow with 42 Astoundingly Useful Scripts and Automations for the Macintosh!
- AppleScript Preview in Snow Leopard and Lion
- Preview supports AppleScript, but the support is turned off by default. You can enable it with three terminal commands.
- Avoiding lockFocus when drawing images in Swift on macOS
-
Apple’s recommendation is to avoid lockFocus if you’re not creating images directly for the screen. Here are some examples from my own Swift scripts. You can use this to draw text into an image, and to resize images.
- Combining multiple PDF files into a single file
-
Automator allows you to combine multiple PDF files into a single file.
- Command-line mail on OS X: re-alpine and Geektool
-
If you do a lot of automated command-line scripts, you probably also generate a lot of mail to /var/mail. OS X only has the mail program built-in, and its GUI mail client hasn’t been able to add simple mail accounts since about OS X 10.2. Alpine can get you a better mail client, and Geektool can provide better notices.
- Custom “From” addresses in Apple Mail
-
It’s remarkably easy to set up multiple addresses per account in OS X Mail, once you know the trick.
- Disabling Quit and rewriting keyboard shortcuts
- If you, like me, accidentally quit Safari too often when all you meant to do was close a window or tab, you can disable or remap Safari’s Quit keyboard shortcut.
- Enable AirPrint for all connected Mac printers
-
I have an iPad and an old workhorse of a printer, an HP 1012 LaserJet, connected to my iMac. I almost never need to print from the iPad, but when I do, handyPrint works.
- Leopard setuid and passwd file changes
- Leopard Server introduced two major changes to two lesser-used features: setuid root script wrappers and BSD flat file authentication.
- Media duration in Python on Mac OS X
- It turns out to be very easy to get the duration of MP3 files, MPEGs, and other media files on the OS X command line.
- Navigating long menus with the keyboard
-
Long menus--such as the services menu--can be navigated using they keyboard rather than the mouse.
- A new, accessible Mimsy
-
I’ve recently updated the HTML in Mimsy to be more accessible to alternative browsers. But this does mean that if you’re still using Internet Explorer on the Macintosh, you might want to move to something else.
- One-handed tabbed browsing in Safari
- You can open links in a new tab, using Safari, Firefox, or Netscape, with just the single-button mouse and no special software.
- Quality compressed PDFs in Mac OS X Lion
-
The instructions for creating a “reduce PDF file size” filter in Lion are the same as for earlier versions of Mac OS X—except that for some reason ColorSync saves the filter in the wrong place (or, I guess, Preview is looking for them in the wrong place).
- Quality reduced file size in Mac OS X Preview
-
You can use Quartz filters to reduce the size of your PDFs in Mac OS X while maintaining a high image quality.
- Save clipboard text to the current folder
-
Use the Finder toolbar to save text on the current clipboard directly to a file in the folder that Finder window is displaying.
- SilverService and Taskpaper
- SilverService is a great little app if you commonly need to repetitiously modify text. Any application that supports services will support running selected text through command-line scripts via SilverService.
- Stack windows on top of each other
- If you want to stack multiple windows directly on top of each other, it’s easy to do in any well-behaved application, such as Nisus Writer Pro, Safari, Mail, and even older applications like AppleWorks 6 and Microsoft Word X.
- Using Exposé effectively on Mac OS X
-
A few simple tricks with window management in OS X can make working with multiple applications or multiple windows much easier and faster.
- Video podcasting with the iMac’s built-in iSight
- iMovie does not yet work with the new G5 iMac’s built-in video device, but Apple does provide a free download that works--sort of.
- What app keeps stealing focus?
- I’ve been having a problem on Mac OS X with something stealing focus. Here’s how to at least find out what that something is.