Tux Widgets

From Tuxisalive

Jump to: navigation, search

Contents

[edit] Introduction

[edit] What are tux widgets?

Tux Widgets is a new development in progress in order to easily manage multiple lightweight applications for tux from a central point. Widgets will offer a lot of nice little functionalities to tux that you can add, enable, disable and configure to your taste. Widgets examples could be: weather forecast, email notification, alarm clock, news reader, etc. See below for the list of the widgets in development.

[edit] Why widgets?

Small python scripts are easily done and there's only one small step towards bigger scripts or small applications. Packaging these into widgets would offer an easy access of your scripts to any end user.

[edit] The widget framework

[edit] Specifications

  • Widgets should be easy to develop, basically a simple integration of a python script for tux with a few configuration parameters should be enough.
  • They should be automatically loaded by the widget manager at startup if they are present in the widget directory.
  • Conflicts should be handled easily. When multiple widgets are controlling tux at the same time, you'll get conflicts between them. Which widget do you want to handle the push of the head button? If you just got an email notification, you probably want the head button to read the email but if you get a VOIP call, you want to pick up the call. The widget manager should handle conflicts between different widgets without adding complexity to the widgets themselves.
  • The widget engine should have a list of registered 'events' associated with widgets. The widget is called when the corresponding event occurs.
  • The implementation of the widget manager and a couple of widgets should be quick as there's a urgent need of such application from non programmers at the moment. Development time and ease of widget development should be priorities.

[edit] Widget engine

  • The engine is running in background.
  • There's a list of registered 'events' and each event can be associated with a widget. The 'events' should be registered (provided) by the widgets themselves but the engine can also add some special events.

[edit] Handling conflicts

There are 2 modes of operation: the default mode and the widget mode.

The widget engine is in default mode at startup. When a registered event occurs, the engine enters the widget mode by loading the widget associated with this event.

In the widget mode, only the active widget can control tux and decide to return to default mode. This means that all buttons, remote buttons and other events are temporarily disassociated from their default behavior and only the active widget can use them to achieve it's functionality.

In case no user interaction occurs for a time period, we want a timeout to utomatically return to default mode.

Pros:

  • easy implementation;
  • the widget has full control of tux and the remote when it's active.

Cons:

  • when a widget is active, other widgets can't do anything

[edit] Preferences

  • The preferences should list the widgets contained in the widget folder at startup and provide enable/disable check boxes for all of them.
  • General preferences should include the user name and other personal data that can be useful to tux, and default applcations like audio player, browser, email client, etc.
  • Configuration of the widgets can be done with a simple button that opens a configuration file. As the configuration of every widget will be dependent of the widget itself, it's preferable to use a simple configuration file for each widget and edit it in a text entry box. A graphical interface to configure options would be too complex to implement. Good comments in the conf file are preferable to a bad GUI.
  • We should also be able to associate widgets to events. Widgets can register events directly with another widget associated with it, or itself. But widgets could also register events without any association and the user could be able to associate them manually.

[edit] Widget structure

  • The widget should include multiple files that should be included in a single folder. Files may be the main widget python script, the configuration file and optional translation files, audio files, script files, etc.
  • The widget python file should have 3 main functions:
    • the init function registers the events and can do any initialization;
    • the main function is called whenever one event associated with the widget is called;
    • the notification function is called routinely in default mode and is necessary for the widget to trigger events. The event could be triggered by assigning a value to it and the widget's main function would delete it when called. The notification function can generate Tux Droid events (button, remote key, etc.) by checking the status of tux or any other event (mail notification, VOIP call, etc.)
  • The configuration file should include evrything the end user is supposed to customize, this can be the email pop server, the list of RSS channels, etc.
  • How to handle internationalization?

[edit] Widgets

Here's a list of all widgets in development, feel free to add yours with a description if you're working on something, so people can join efforts instead of re-inventing the wheel.

[edit] Notification widget

This one is more like a system widget and simply registers a lot of different generic events from tux's status. These events will be available to the user in preferences and to other widgets that could associate them with a widget.

[edit] RSS Reading

  • Configure a list of RSS feeds.
  • Notification of new messages.
  • Read feed title, message header and body, use of the remote for next, previous, change feed, etc.

[edit] IM

  • Widgets to control various IM applications like gaim, xchat, psi, etc.

[edit] Meteo on a specific location

  • Configure the location.
  • Can give the current weather.
  • Can give the weather forecast.

[edit] Traffic

  • Configure the location.
  • Gives the traffic situation.

[edit] News

  • Configure some news sources and categories (website, podcast, ....)
  • Read or play the news depending on the selected category. A button of the remote can be used to enter the news widget, then other buttons could be used to select the category and read the news.

[edit] Audio/multimedia software control

  • A single widget could be used to control one multimedia application with the remote control or from tux's buttons.
  • Use audio menus for navigation.
  • Tells the title and extra information about the media playing.
  • Use T9 to allow a fast selection of your favorite artist or song

[edit] Presenter

  • Presents and control a presentation with your tux.
  • Should support Impress (Open Office), pdf or any presetation software.
  • Slide show and mouse control from tux's remote control.
  • Each slide can be associated with a script so tux could participate on each slide by explaining stuff, doing movements and interacting with the presenter or the audience.
  • Automatic scripting from the slide notes or the slide itself with simple tags to control the TTS and movements (Impress).

[edit] Alert

  • Various notifications that can trigger a script: ebay, IM buddies getting online, forums, etc.

[edit] Simple alarm clock

  • Configure alarms from the widget or dynamically from tux.
  • Trigger events from the alarms.
  • Associate scripts or other things to the alarms.

[edit] Wake-up clock

  • Daily alarm clock dedicated to wake-up time.
  • Snooze.
  • Configured to read the news or download and play a podcast

[edit] E-mail

  • Email alert with optional subject, author and content reading

[edit] Scenario (Tux Droid Script)

  • A scenario or Tux Droid script is a python script associated with sound files and various resources.
  • Create basic scenarios with the remote control
  • Scenario Player: the equivalent of MP3 player using a compressed form of one script plus wave files.
  • Configure the list of scenarios, play them with a selection from the remote with T9.
  • The widget manager could also have a drag & drop feature to add and play scenarios directly, this is a bit more tricky and less compatible.

[edit] Tux messaging

  • Communication between tux owners could be done through a central server.
  • Record an audio message from tux, replay the message while recording movements controlled by the remote control in order to get a simple scenario.
  • Send the scenario/script to another "tuxisalive member" through our server (own server, ftp, pop, etc.) by selecting the recipients's name with the remote (T9).
  • The same widget will poll the server to download and execute new scripts received.

[edit] VOIP

  • Custom VOIP application for tux or control an existing VOIP application.

[edit] Send Voice Message

  • Some VOIP services accept to leave an audio message to a member, the message could be recorded from tux and sent automatically to someone in your call register.

[edit] Existing Widgets-oriented projects

Personal tools