Applications and Processes

Quicksilver is usually referred to as a launcher. It does a lot more than applications in that category but it’s also good at launching applications; and of course, more. The Catalog includes four sources in the Applications set:

There are other sources for applications in the other catalog sets. Under User, Dock is a Dock Applications source, under User, Recent Items is a source for Recent Applications. Even if an application is found by multiple sources (e.g., where it’s installed, the Dock and recently used), it only has one entry in the Catalog. As a result, selecting any kind of application is easy. The default action is Open so basic launching functions are covered.

With some applications, bringing them up in the first pane and typing shows a results list of recent files opened by that application. Typing shows application’s contents just like Show Package Contents in the Finder. Some plugins change the behavior of to show application specific items. E.g., typing into iTunes allows browsing the music library by genre, artists, albums, etc. Typing into Mail shows the different mailboxes and folders. Safari shows bookmarks, Adium and iChat show buddies, Contacts shows contacts, iPhoto shows photo libraries and albums, Cyberduck and Transmit show favorites, etc. Some require the application to be running for to work, others don’t.

Basic Application Actions

The Open action works on Dashboard widgets as well. To add widgets to the catalog add a custom catalog source for /Library/Widgets/ and another for ~/Library/Widgets/. Using the Open action on one (or more with the comma trick) will activate the Dashboard and open the widget. Use this for widgets that aren’t important enough to have open on the Dashboard all the time. Put the two catalog sources in a group called Widgets and use the Show Contents action on it to search just widgets. Create a trigger for this or to open a specific widget to make this easier.

Since applications are really just files on this disk (actually a special type of folder called a package), all the file and folder actions described above work on applications. To find out which folder an application is in or to make it appear in a Finder window (for example to use Show Package Contents) use the Reveal action.

A file action that’s probably more useful for applications is Open at Login. Use this to set some program (like an IM client) to open automatically at login time without having to open the Accounts Systems Preference pane and navigate to the Login Items tab there. The Do Not Open at Login action removes an application from the list.

The Quit action stops running applications. There’s also a Quit Others action which is disabled by default to prevent accidental use (enable it in the Action preferences). Relaunch quits and then starts the application. Quicksilver has a shortcut to make relaunching it easier; just activate Quicksilver and type Q to restart it. To Force Quit an application use the Kill Process action from the Process Manipulation Actions plugin described below.

The Hide and Hide Others actions behave as the commands in an application’s menu. These actions are disabled by default, enabled them in the Action preferences. macOS includes the H and H shortcuts in most applications so they’re probably easier to use. Use Quicksilver to perform these commands on the non-active application. Current Application (Hide) is a good mouse trigger, since there’s no easy macOS native way to hide an application using the mouse. To unhide an application use the Activate action.

Activate makes a running application active (like choosing it with ). It is disabled by default, enabled it in the Action preferences. It will not start an application if it’s not running. If an application’s windows are open or hidden, Activate makes them all appear in front of other application windows. If all of the application’s windows are closed (with W or by clicking on the red button on the top left of the window), Activate makes the menu for the application appear but not a window. There isn’t a standard mac shortcut to bring all the windows to the front like there is for Hide or Minimize so Current Application (Activate) might make a useful trigger. By default, using the Open action on an application that’s already running performs the Activate action, though this can be changed in the Extras Preferences under the Application reopen behavior option.

It’s common to create triggers to start commonly used applications. Some people bind them to function keys and others use mnemonics for the application name. E.g., S for Safari (Open). Some people add modifiers to the shortcut to do related actions. E.g., S for Safari (Hide) or Safari (Quit). A better choice might be to use the Toggle Application action. It starts the application if it isn’t running, hides the application if it’s active, and shows the application when hidden. Following the above examples, consider setting the shortcut S to Safari (Toggle Application).

The actions above, Open, Hide, Activate, and Toggle Application work on the whole application, including all of its windows. There’s no way with Quicksilver to show or hide specific (i.e., document) windows of an application. The closest is that the Application reopen behavior option in the Extras Preferences allows Open to show the front window or show all windows instead of doing Activate.

Advanced Process Actions

The Process Manipulation Actions plugin installs actions for using advanced operating system features to control running applications. Be sure the catalog source Running Applications & Processes under Applications is enabled for these actions to appear. Mostly programmers will be interested in these features.

The scheduling priority of a process can be changed with the Raise Priority, Lower Priority and Set Priority … actions. Set Priority … takes a text argument which is a number for the new priority in the third pane. It also requires administrator privileges and will prompt for a password. As of B51 Raise Priority and Lower Priority seem to be in increments of 5 and Set Priority … seems unreliable, since checking the priority with ps after a change shows a different value.

The Send Signal… action sends an arbitrary signal to a running process; select the signal name in the third pane. Three actions send commonly used signals. Kill Process sends SIGKILL; the same as Force Quit. There are also Resume Application (SIGCONT) and Pause Application (SIGTSTP) actions.

The command line utility lsof is a useful debugging tool that shows the files a process has open. The List Open Files action does the same thing but displays the files in a results list in Quicksilver. Another useful debugging tool is sampling a process to see what code is being executed. Activity Monitor has a command to do this and the Process Manipulation Actions plugin installs the Sample Process action to display the stack traces in a pop up text window.

In macOS, double-clicking an already running application just activates it. While that’s probably more useful than starting a second copy, in some situations, like when testing a new build of an application, that’s useful too. The Launch a Copy action starts a second copy of an application running as the user. The Launch as Root action starts a second copy running as root; it prompts for an administrator’s password.

Dynamically Accessing a Menu

macOS has facilities built in to help users modify how they see, hear and control the computer. These features can be set in the Universal Access System Preferences. The option “Enable access for assistive devices” gives programs access to the user interface of running applications, i.e., the menu, buttons, other controls, etc. Enable this option and install the User Interface Access plugin to give Quicksilver access to these facilities.

With a running application in the first pane, the Menu Bar… action will show a list of the top level menus of the application in the third pane. In this example, choosing the File menu of Mail will make Mail the active application if it isn’t and will open the File menu.

In addition, typing into the File menu item in the third pane will show the contents of the File menu and its submenus. So it’s possible to execute any command in the menu such as New Message, Close, or Print. Navigating down the menu structure can be a little tedious. Quicksilver also has the Menu Bar Items… action which flattens the menu structure in the third pane and makes available all the command in the application in one results list to choose from.

If Menu Bar Items… gives quick access to every menu command why ever use Menu Bar…? First, in some applications, menu commands aren’t always unique. For example, in the popular multiple protocol IM client application Adium, the Status menu contains different “Available” and “Away” commands for each configured IM account. If they were in just one long list, there would be no way to tell which account status was changed. Second, some applications have very large menus and populating them can take a while. Using Menu Bar… to get to Print in the File menu may be faster then waiting for Menu Bar Items… to populate hundreds or thousands of bookmarks in a browser.

These actions basically let Quicksilver do anything any application can do. There is a delay when using them because Quicksilver has to ask the application what menu items it has. People sometimes forget that an application’s menus do change, for example, the bookmarks and history in a web browser change all the time. Unfortunately, these dynamically generated items cannot be saved in triggers since they might not be around later. Triggers with empty third panes will work, it’s just commands with third pane items that won’t save. The following triggers are possible: Current Application (Menu Bar...) and Current Application (Menu Bar Items...) and allow the Quicksilver matching algorithm to be used to find commands easily. To add a shortcut for a menu command that doesn’t have one, use the Keyboard Shortcuts tab in the Keyboard & Mouse System Preferences. It will only work in the application and not globally but it’s similar to what Quicksilver could do.

The Show Menu Items action is similar but it opens a new command window with a results list of all items from all menus in the first pane (it’s not similar to the Show Menu action). Use the Press action to execute the command or one of the text actions such as Copy to Clipboard or Paste.

The plugin adds others actions: Get UI Element, Select, and Perform Action…. But as of B51 they are buggy.