Alfred includes a very useful set of system commands so that you can quickly control macOS directly from your keyboard.
In this section, you'll find out about:
Using System Commands in Alfred
The System Commands keywords allow you to tell your Mac to perform an action without having to use the mouse to find a menu item in macOS.
The following actions can be performed by using the associated keyword. Each keyword can be customised in Alfred's Preferences under Features > System and some actions include an optional confirmation pop-up.
- Screen Saver
- Show Trash
- Empty Trash
- Log Out
- Sleep Displays
- Shut Down
- Hide (applications)
- Quit (applications)
- Force Quit (applications)
- Quit All (applications)
- Eject (Local Mounted Volumes)
- Eject All
Want to lock your screen without returning to the login screen?
Launch System Preferences, go to Security & Privacy > General, and check the box to "require password X minutes after sleep or screen saver begins". Using the "screensaver" keyword will now lock your screen, requiring a password to unlock.
If you prefer this to the default Lock action, you can even disable the Lock action and change the screensaver keyword to "lock".
Using the Eject and Eject All commands
The Eject and Eject All actions have additional optional settings.
Setting media types to eject
By default, Alfred will look for local mounted volumes when you use the Eject action; This includes USB drives, DVDs and mounted images.
You can change the type of media included in your Eject list, changing to scope to only removable media, or to more broadly include mounts in /Volumes/ as well.
Adding volumes to a blacklist
If there are any volumes you want to avoid ejecting by mistake, these can be added to your blacklist. Simply click the + button in the bottom right and type the name of the volume you'd like Alfred to exclude from the Eject list. You can remove the volume later on by selecting it and pressing the - button.