Desktop automation with Cuttlefish

Third Hand

Cuttlefish automates actions on your Linux computer when triggered by an event.

Cuttlefish provides automation functions for your computer, which can save you many clicks and commands. The program reacts to certain events, such as connecting to a wireless LAN or disconnecting a notebook's power cord, and performs one or more predefined actions depending on the event. These stimulus-reaction pairs are called "reflexes."

For example, if you're disconnected from power and want to save battery power, Cuttlefish can turn off Bluetooth, wireless, or both. A trigger can also launch a certain application that leads to further automated actions predefined by Cuttlefish, such as starting a secondary program when another program is run.

After installation, start Cuttlefish from the Start menu as usual. The icon goes right to the system tray for immediate access to self-defined actions. To make Cuttlefish as efficient as possibly, add the program in the Startup Applications Preferences dialog. You don't even need to go to system settings, Cuttlefish provides autostart through its interface. Click the Edit  | Preferences menu and in the resulting dialog set Autostart to On .

Defining Actions

To set a trigger for an action – known as a "stimulus" in Cuttlefish jargon – click New after starting the software. You then set the appropriate action (Figure  1). Giving the action a descriptive name ensures that you'll be able to find it later. You can even change its name at a future point.

Figure 1: Trigger settings let you define the stimulus that activates the action, such as starting a program (Firefox in the example).

Use Show notification to set whether you get a hint when a certain "reflex" occurs. To show the defined reaction from the Cuttlefish icon in the system panel, set the List in indicator menu option to ON .

You can determine the stimulus that triggers the reflex by setting the Activated by stimulus option to ON . This opens the Please select an event type dialog (Figure  2). To provide a better overview of the events, the developers divided stimuli into categories. When you click a Type , a short description appears at the bottom.

Figure 2: Many different event types are available for triggering reflexes.

If you select the Application starts type, for example, you can determine in the Application drop-down box which software you want to elicit the response. You can also specify whether you want a reflex on initial startup only (via Trigger only the first instance ). If you were to select a browser, Cuttlefish would otherwise restart the app with each browser startup.

As in choosing stimulus applications, the options on the Basics tab are contextual according to the event type. With At time of day , you can select a time and day of week, with Power Cable unplugged you can determine whether you want the reaction triggered at boot time or at software startup (Figure  3).

Figure 3: The Basics tab provides different settings depending on the stimulus.

The actions that Cuttlefish performs after a stimulus is set appear on the Reaction tab. To add a new action and set multiple actions, use the plus sign under the Action area (Figure  4).

Figure 4: Many types of actions are available, and you can combine them to follow one after the other.

Under battery operation, for example, the Mute volume action is available, so you will not bother anyone with laptop sound effects. Additionally, you could Deactivate WLAN and Deactivate Bluetooth when on battery.

Conclusion

Cuttlefish can facilitate daily operations significantly and save you a lot of mouse clicks. If you're used to working with one program only, automation is of limited use. However, laptops provide many scenarios in which it would be useful.

If you run two or more applications simultaneously, Cuttlefish can start them with an accelerated chain of actions. You don't necessarily need a stimulus to define an action: You can trigger it from the system panel with a single click.