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.
example: you could set up a reflex to deactivate Bluetooth and WiFi when the screen locks; or have Firefox open when you connect to Wifi. You can even set up your wallpaper to change when you plug in a USB device.
How to install Cuttlefish
Open a terminal
sudo add-apt-repository ppa:noneed4anick/cuttlefish
sudo apt-get update
sudo apt-get install cuttlefish