Freevo

- Index
- IdlebarPlugins

# IdlebarPlugins

1. Overview
2. Weather
3. Clock
4. Holidays
5. Mail
6. Multi Mail
7. TV
8. Volume
9. CD status
10. Sensors
11. Procstats

## Overview

This plugin puts an empty bar at the top of the screen which can be used by other plugins to display their information. There are quite a lot of different idlebar plugins. If you want to use any of them, you first need to activate the idlebar plugin itself. All the others on this page depend on this plugin

To activate it, put the following in your local_conf.py.

    plugin.activate( 'idlebar' )

This activates the bar, but puts nothing in there, so you need to add more plugins. Note that plugins inside the idlebar are sorted based on the `<LEVEL>` (except the clock, it's always on the right side)

## Weather

This plugin will show the weather to you as an icon. It's based on your location code (take a look at http://www.nws.noaa.gov/tg/siteloc.shtml to know yours). You can also set the temperature unit as second parameter in args ('C', 'F' or 'K')

To activate the idle bar weather, put the following in your local_conf.py.

    plugin.activate( 'idlebar.weather', level=<LEVEL>, args=('<4 letter location code>', ) )

Example: New York City Weather

    plugin.activate( 'idlebar.weather', level=30, args=( 'KOKX') )

Example: New York City Weather in Fahrenheit

    plugin.activate( 'idlebar.weather', level=30, args=( 'KOKX', 'F') )

Example: New York City Weather in Kelvin

    plugin.activate( 'idlebar.weather', level=30, args=( 'KOKX', 'K') )

## Clock

This plugin displays a clock in the idlebar, which shows the current time.

To activate it, put the following in your local_conf.py.

    plugin.activate( 'idlebar.clock' )

The clock will always be displayed on the right bar.

The default display format of the clock is: `<Abbreviated weekday> <12hour>:<minutes> <AM/PM>`. If you do not like the format, you can easily change the format by specifing the format as an argument, such as:

    plugin.activate( 'idlebar.clock', level=50, args=('%a %H:%M'))

This give `<Abbreviated weekday> <24hour>:<minutes>`.

    %A - Full weekday name.
    %a - Abbreviated weekday name.
    %B - Full month name
    %b - Abbreviated month name
    %I - Hour (12-hour clock) as a decimal number [01,12].
    %H - Hour (24-hour clock) as a decimal number [00,23].
    %M - Minute as a decimal number [00,59].
    %m - Month as a decimal number [01,12].
    %b - Name of Month
    %d - Day of the month as a decimal number [01,31].
    %p - Locale's equivalent of either AM or PM.
    %y - Year without century as a decimal number [00,99].
    %Y - Year with century as a decimal number.

## Holidays

This plugin checks if the current date is a holiday and will display a user specified icon for that holiday. If no holiday is found, nothing will be displayed. So unfortunately most of the time you won't see this plugin.

To activate the holidays plugin, put the following in your local_conf.py.

    plugin.activate( 'idlebar.holidays' )

Then you must specify your holidays and their icons in local_conf.py. There are some dates defined in freevo_config.py, but you should NOT alter freevo_config.py, instead you must define your own array in local_conf.py. It should be like:

    HOLIDAYS = [ ('01-01',  'newyear.png'),
                 ('02-14',  'valentine.png'),
                 ('05-07',  'freevo_bday.png'),
                 ('07-03',  'usa_flag.png'),
                 ('07-04',  'usa_flag.png'),
                 ('10-30',  'ghost.png'),
                 ('10-31',  'pumpkin.png'),
                 ('12-21',  'snowman.png'),
                 ('12-25',  'christmas.png')
               ]

You must have those icons (ie: newyear.png) in `<FREEVO_PATH>`/skins/images/holidays/, these listed above are already there, but if you add more holidays (or someone's birthday), you must put the related icons to `<FREEVO_PATH>`/skins/images/holidays/ yourself.

## Mail

This plugin checks for mail in your local Unix mailbox. Usually that box is in /var/spool/mail/`<USER>`. If you use a pop3 or imap email, you have to use some program like fetchmail ( http://catb.org/~esr/fetchmail/) to download your mail to your local box.

To activate the idlebar mail plugin, put the following in your local_conf.py.

    plugin.activate('idlebar.mail', level=<LEVEL>, args=('</path/to/your/mailbox>'))

Example: User dmeyer

    plugin.activate('idlebar.mail', level=10, args=('/var/spool/mail/dmeyer'))

## Multi Mail

PleaseUpdate: Can someone who is using this plugin check this

This plugin is similar to the simple mail plugin, but it does more. It displays an icon in the idlebar representing the number of emails for a specified account. In the case of IMAP, it only lists unread messages

Activate with:

    plugin.activate('idlebar.MultiMail.Imap', level=10, args=('username', 'password', 'host', 'port', 'folder'))
    plugin.activate('idlebar.MultiMail.Pop3',    level=10, args=('username', 'password', 'host', 'port'))
    plugin.activate('idlebar.MultiMail.Mbox',    level=10, args=('path to mailbox file')

(port and folder are optional)

## TV

This plugin alerts you if you need to download your XMLTV again (in case you don't use cron for that). It's based on `<listing_threshold>`, which is the number of hours before your xmltv listing run out when the TV icon will present you a warning. Once your xmltv data is expired, it will present a more severe warning. If no args are given, then no warnings will be given.

To activate the idlebar tv plugin, put the following in your local_conf.py.

    plugin.activate( 'idlebar.tv', level=<LEVEL>, args=(<listings_threshold> ) )

Example: 12 hours before xmltv data expires

    plugin.activate( 'idlebar.tv', level=20, args=( 12) )

## Volume

This plugin shows the current volume level on the idlebar. Activate it with:

    plugin.activate('idlebar.volume', level=0)

## CD status

This small plugin will show you the state of all ROM drives available to Freevo.

To activate the idle bar cd status, put the following in your local_conf.py.

    plugin.activate( 'idlebar.cdstatus' )

## Sensors

This plugin can display your cpu and case temperatures and ram usage. This requires a properly configured lm_sensors. If the standard sensors frontend delivered with lm_sensors works you're OK. The sensors plugin can also read kernel 2.6 sensors (located in the /sys filesystem). This doesn't require lm_sensors installed, but needs the proper kernel Chip & Bus driver enabled (and loaded if you compiled them as modules). When one of your temperatures goes over the lm_sensors specified maximum temperature, the font color of all text on the idlebar changes to red, so you will notice when your freevo box is starting to fry :). If you want to adjust these maximums, have a look at the lm_sensors documentation. The defaults are sane (60°C).

To activate the idle bar sensors, put the following in your local_conf.py.

    plugin.activate('idlebar.system.sensors', level=40, args=('<cpusensor>', '<casesensor>', '<meminfo>'))

`<cpusensor>` and `<casesensor>` are the corresponding lm_sensors: they should be `temp1`, `temp2` or `temp3`. The default values are `temp3` for `<cpusensor>` and `temp2` for `<casesensor>`. You can choose which meminfo you want, the types are the same as in /proc/meminfo:

    MemTotal , MemFree, MemShared, Buffers, Cached, SwapCached, Active, Inactive,
    HighTotal, HighFree, LowTotal, LowFree, SwapTotal and SwapFree

The default is:`MemTotal`. These names are case-sensitive, so be carefull.

`<casesensor>` and `<meminfo>` arguments can be set to None if you don't want them. `<cpusensor>` cannot be turned off at the moment.

Example: CPU is `temp3` in lm_sensors, I want no case info and I want to display the free memory (`MemFree`):

    plugin.activate('idlebar.sensors', level=40, args=('temp3', None, 'MemFree'))

## Procstats

This plugin retrieves information from /proc/stat and shows them in the idlebar. This plugin can show semi-accurate cpu usage stats and free memory in megabytes (calculated approx. as `MemFree+Cached?`)

Activate with

    plugin.activate('idlebar.system.procstats',level=20)

for defaults or

    plugin.activate('idlebar.system.procstats',level=20,args=(Mem,Cpu,Prec))

where

- `Mem`: Draw memfree (default=1, -1 to disable)

- `Cpu`: Draw cpuusage (default=1, -1 to disable)

- `Prec`: Precision used when drawing cpu usage (default=1)

last edited 2005-01-05 11:52:44 by JohnMolohan
current version: http://freevo.sourceforge.net/cgi-bin/doc/IdlebarPlugins