We have mentioned tools that allow you to schedule tasks in Ubuntu, but if you want to set a trigger and automate tasks based on the result of a prior action, then CuttleFish would be the one for you.
Cuttlefish is an app for Ubuntu that allows you to create a series of tasks that can be triggered based on the result of a prior action. As what the developer described:
With Cuttlefish your Ubuntu will adapt its appearance and settings according to the environment
In Ubuntu, open a terminal and type the following:
sudo add-apt-repository ppa:noneed4anick/cuttlefish sudo apt-get update sudo apt-get install cuttlefish
Note: Cuttlefish is supported in Ubuntu Precise only.
The concept behind Cuttlefish is very simple. You first create a basic profile (known as reflexes) that will be triggered by an action (known as stimulus), such as “When Firefox Opens”. Next, you associate an action for the profile to perform when it is activated, like “Close Google Chrome”. Connecting them together, for this example, you will be able to get the system to close Google Chrome automatically when Firefox is launched.
After the installation, launch Cuttlefish from the Application Menu.
Click the “New” button to create a new reflexes. Give it a name and flip the “Activated by stimulus” switch to “On”.
Click the Stimulus button and select from the dropdown the event you want to use to trigger this profile. Events include “When Application Starts”, “When Application Stop”, “When Screensaver turned on”, “When USB devices plugged in” and many others.
For (almost) any event you choose, there is more options for you to further refine the stimulus. For example, when I select “Application Starts” from the list, a new field appears to allow me to select the application that I want to associate to. In this case, I select Firefox.
Once this is completed, click the “Reaction” tab at the top. Click the “+” button at the bottom to add an action (to be performed).
You can add many actions and move them up/down to arrange them in the order you want them to be executed.
After you have completed the configuration, simply click the “Back” button and you should see your newly set Profile in the dashboard.
To test it, simply run the pre-defined actions that you have configured and see if it triggered the profile. For my case, it works perfectly and it comes with a notification when the Profile is triggered.
Other than the above triggering acts, Cuttlefish can also be used to perform several tasks all at one time. Instead of binding the profile to a triggering action, you can leave it empty and define the actions to perform when this Profile is selected. For example, when I need to write articles, there are always a few apps that I need to open – Firefox, Gimp, File Manager, Libre Writer etc. In this case, I can create a profile to open these apps with a single click. All I need to do is to go to the Cuttlefish icon at the system tray and select this profile. All my apps will be opened at once.
Cuttlefish is a really useful app to help you improve your productivity. It doesn’t cover every single function in the system, but for those it supports, you will be able to come up with plenty of combination to get things done faster.
What other ways do you use to automate your tasks in Ubuntu?
Our latest tutorials delivered straight to your inbox