Mac|Life

General commands

-

Terminal: It’s a word to strike fear into many Mac users. Most of us think of it as being a complex and terrifying beast that we’re best keeping well away from. But nothing could be further from the truth. Firstly, Terminal is just an app like any other. It does allow access to things deep inside OS X, which is perhaps where some of the fear comes from – the deeper we can go, the more likely we are to do something that causes serious problems. The other aspect of Terminal that causes trepidatio­n is that to use it you have to type special commands. But by learning those commands Terminal is tamed.

You can do plenty of genuinely useful stuff with Terminal, of course. It provides one of the best ways to customize your workspace to deal with a Dock that’s packed full of icons. The following command adds a blank space that you can drag to the position you want in order to organize app icons into groups:

defaults write com.apple.dock persistent­apps -array-add '{"tile-type"="spacertile";}'

Run this multiple times to add more spacers, then type killall Dock and press ® to make them appear. Remove a spacer by dragging it up off the Dock until you see a tag labeled “Remove,” then let go. If you hide apps you’re not using by pressing

ç+h (or Alt+ ç+h to hide apps other than the foreground one), any windows those apps have open don’t appear in Mission Control, nor are they shown in the Dock like minimized ones. Despite this, you can tell an app is still running thanks to the indicator under its Dock icon, but you’re left to click its icon to remind yourself of what windows it has open, if any.

To distinguis­h between apps that have no windows open from those that are hidden but may have windows open and are using resources – resources you might need – enter the following command to make hidden apps’ icons semi-transparen­t:

defaults write com.apple.dock showhidden -bool YES; killall Dock

If you’ve organized Launchpad’s icons and got into a mess, perhaps because the system you devised no longer works well, enter this command to reset Launchpad to its default layout of built-in apps on the first page and third-party ones on later ones:

defaults write com.apple.dock ResetLaunc­hPad -bool TRUE; killall Dock

To reverse the effects of of these commands, run them again but substitute FALSE for TRUE, NO for YES, or “delete” instead of “write.”

There are third-party apps that keep your Mac from going to sleep, but you can do it by entering caffeinate in Terminal to prevent sleep indefinite­ly (see Tricks in Terminal, right, for how to interrupt it). To postpone sleep for a defined duration, use this form:

caffeinate -u -t 900

The -u after the command’s name stops the screen going to sleep, and the numeric value that follows -t is the duration, in seconds, that you want to prevent sleep mode kicking in.

with terminal, you can customize your workspace to deal with a dock full of icons

 ??  ??
 ??  ?? After you’ve reset Launchpad’s layout, you can use Launchpad Manager ($7.99, launchpadm­anager.com) to quickly put apps in the order you’d prefer. There are parts of prominent OS X features that Apple gives you no graphical means to customize, but you can do so in Terminal.
After you’ve reset Launchpad’s layout, you can use Launchpad Manager ($7.99, launchpadm­anager.com) to quickly put apps in the order you’d prefer. There are parts of prominent OS X features that Apple gives you no graphical means to customize, but you can do so in Terminal.

Newspapers in English

Newspapers from Australia