View on GitHub
Download this project as a .zip file Download this project as a tar.gz file

A project by Tom Heale, Joey Maalouf, and Keenan Zucker

View the project proposal here.

View the framing document here.

View the design review reflection here.

View the second framing document here.

View the code review reflection here.

View the final poster here.

What is it?

Rainmeter for Ubuntu, done in Python.

Firecracker is a fanmade rewrite of Rainmeter for Ubuntu. Just like Rainmeter, Firecracker windows are fully customizable through editing of configuration files, giving users the ability to tweak and edit their windows to their liking.

The purpose of Firecracker is to generate widgets that can be accessed from the Ubuntu desktop. The widgets compose a suite of applications ranging from basic text and image displays to music players and url links.

Text Widget

Text widgets display the specified text with the specified parameters (e.g. font size and color).

Text Widget Example

Image Widget

Displays a given image of a given size from the specified folder. The default folder is .../firecracker/images.

Image Widget Example

Clock Widget

The clock widget displays a digital clock with the current system time.

Clock Widget Example

Weather Widget

This widget takes your zip code as an attribute and uses python pattern.web to get your local weather conditions. It displays the cloud coverage and temperature.

Weather Widget Example

Performance Widget

You can use Firecracker to control your music through Spotify! If you have Spotify installed (see below) and open, this widget will connect to the playlist you're in and allow you to skip back/forward and play/pause.

Performance Widget Example

Player Widget

You can use Firecracker to control your music through Spotify! If you have Spotify installed (see below) and open, this widget will connect to the playlist you're in and allow you to skip back/forward and play/pause.

Player Widget Example

Link Options

Any Firecracker widget can have an associated link activated with a double-click and specified through the configuration file. The link is run through terminal using python subprocess, and the command assumes the input form 'process' 'url'. This allows you to not only to specify a web browser and address, but also to run more system specific commands. You can use Firecracker links to do anything from open Facebook to run shell files.

Why?

This is our final project for SoftDes Spring 2015 at Olin. We enjoy using Rainmeter on Windows, and we found that Ubuntu lacks that functionality, so we decided to add it ourselves.

Code Architecture

Our wrote our code in an object oriented way. We have a main wrapper file called 'firecracker.py'

Then we have a file called 'firecracker_utils.py' where all of the good stuff is encoded. We can represent this structure using a simple UML:

Our FCManager class has FCWindow elements. Each of these elements have a FCItem attribute, where all of the information from the configuration file is parsed. It is then represented in a PyGTK Window, which has a transparent background and is set to lie on top of the computer’s wallpaper. The information is stored in config files that are generated through a file generator GUI we developed.

Our Developmental Process

Rainmeter offers customization tools by the user editting the configuration files themselves, in a simple 'language' that is easy to understand. We started with a simlilar method. We wrote configuration files with what we thought was simple diction and stucture.

However, we then had a design review! During the review, we learned from our peers and potential users that they did not want to have to write these files! It seemed overly complicated. We decided it was a time to move away from the Rainmeter remake and start developing our own software. From the feedback we recieved, the best choice of how to make the widgets was through a graphical user interface. We used PyGTK again to create a simple GUI.

We have an initial selection screen of which type of widget is to be chosen:

Once one of buttons is chosen, a menu of different attributes and options for that widget is shown:

It can be previewed as well, so the user can see if it looks what they want it to before adding it to the file path. From this GUI, we write the user input into the configuration files, which look like this:

How To Use It

In order to run Firecracker manually:

python2 firecracker.py <config file>

In order to have Firecracker run on startup:

  1. clone this repo to some location .../firecracker
  2. $ cd .../firecracker
  3. put your desired configuration in .../firecracker/skins/example.cfg
  4. $ sudo bash install.sh
  5. relogin to your computer

This process will also install the required dependencies (listed below).

Press Ctrl+M with any widget selected in order to bring up the widget creator, or run python2 firecracker_config_generator.py.

Dependencies

PyGTK

(comes with Ubuntu)

Pattern

sudo pip2 install pattern

psutil

sudo pip2 install psutil

Spotify

sudo apt-add-repository -y "deb http://repository.spotify.com stable non-free" && sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59 && sudo apt-get update -qq && sudo apt-get install spotify-client

Notes

If your system does not have both Python 2 and Python 3 installed, you should be able to use pip and python instead of pip2 and python2.

Attribution:

spotify_controller.sh - https://github.com/computerlove/scripts/blob/master/SpotifyControl

Screenshots:

Screenshot1

Screenshot2