If you regularly use Command+H to “hide” apps, you can also dim their icons in the dock to indicate that they’re hidden:ĭefaults write showhidden -bool TRUE & killall Dockįinally, if you want to automatically display and remove the Dock, you’ve probably found that there’s a one-second pause in the animation-that is, when you hover over the bottom of your screen, the Dock slides in after about a second. Although macOS’ Settings > Dock menu contains some useful tweaks, you can customise it even more with a few terminal commands.įor example, if you want to to add a blank spacer to help organize your apps into groups? Run:ĭefaults write persistent-apps -array-add ‘’ & killall DockĪlternatively, if you want to keep the dock as simple as possible, you can use the following command to cover all apps that aren’t currently running:ĭefaults write static-only -bool TRUE & killall Dock The Dock is a key part of the macOS user interface: It’s where you keep your most-used shortcuts, switch between windows, and cover minimised apps you don’t need right now. (The denotes your home folder, which can also be found at /home/.) To make secret files and directories available again, simply use FALSE instead of TRUE in the original command. … substituting the path to your own private folder or file for /Dekstop/MySecrets. You may use the following command to hide your own folder or file:Ĭhflags hidden ~/Dekstop/MySecrets & killall Finder (I’ll do the same for the rest of the commands in this list that include restarting a service for the sake of simplicity.) You may also use some ampersands to combine those two orders.ĭefaults write AppleShowAllFiles -bool TRUE & killall Finder Then, to ensure that the changes are applied, restart the Finder by typing: If you need to access one for some reason-or if you want to hide some secret files of your own-run the following command in the Finder to see hidden files:ĭefaults write AppleShowAllFiles -bool TRUE They’re secret because the machine needs them, but you don’t. Most people shouldn’t need to access or edit any secret files in general. At that point, the normal energy-saving recommendations will restart. The -u flag tells the machine to behave as if the user is present (so the monitor doesn’t go to sleep), while the -t flag sets a timer for 3,600 seconds in this situation (or one hour). You may simply use the “caffeinate” command to set an anti-sleep timer in this case: On the other hand, you may want to use your Mac’s automatic energy-saving features to prevent it from going to sleep. Which terminates the shutdown process that is currently running in the background? Simply run: to cancel your timer before it expires.
If you want, you can use a particular date and time in the format yymmddhhmm. The command above tells the machine to shut down after 60 minutes, or one hour, but you can change the number to whatever you want. Finally, the +60 reflects our minute timer.If you want to restart the machine, replace this with -r, or if you want to put it to sleep, use -s.
The -h flag indicates that it should halt or shut down.The main command we’re sending to the system is shutdown.Don’t worry, your keystrokes are being sent. You’ll need to enter your password, but asterisks will not appear as you type. The command sudo tells the Terminal to run as a superuser or administrator.Here’s a breakdown of what the order does: To set a shutdown timer, open a Terminal window and type: I occasionally want to leave my machine on for an hour or two as a job completes (such as a huge download) and then turn it off when it’s done. Since the Terminal app is located in Applications > Utilities, you can access it at any time by pressing Command+Space to open Spotlight, searching for “Terminal,” and pressing Enter. These aren’t just for developers and hackers even if you’ve never used the Terminal tricks before, there are a few tweaks that will improve your Mac and increase your command-line trust.
#Terminal mac sleep timer software
UNDERNEATH THE SURFACE YOUR Mac’s pretty GUI is based on UNIX, a decades-old operating system, and you can use its old-school Terminal to execute basic commands that aren’t available via the software or menus.