public
Description: A desktop widget that display informations about CPU speed, temperature and so on through OSD
Homepage:
Clone URL: git://github.com/kratorius/osdwidget.git
osdwidget / handler.py
100644 23 lines (17 sloc) 0.471 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import time
import re
import pyosd
 
import settings
import widget
import gmail
 
def handle():
    w = {
        'gmail': gmail.GMailWidget,
        'batt': widget.BatteryWidget,
        'temp': widget.TemperatureWidget,
        'cpu': widget.CPUWidget,
    }
 
    widgets = [w[widget_name]() for widget_name in settings.widgets if widget_name in w.keys()]
 
    while True:
        [osd.display() for osd in widgets]
        time.sleep(settings.INTERVAL)