75 lines
1.7 KiB
Python
Executable File
75 lines
1.7 KiB
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from i3pystatus import (
|
|
I3statusHandler,
|
|
mailchecker,
|
|
modsde,
|
|
notmuch,
|
|
thunderbird,
|
|
regex,
|
|
)
|
|
|
|
status = I3statusHandler()
|
|
|
|
# Regular expression file watcher
|
|
# If you're using a thinkpad, chances are that this displays your fan speed and level
|
|
regexsettings = {
|
|
"regex": "speed:\s+([0-9]+)\nlevel:\s+([a-zA-Z0-9]+)",
|
|
"file": "/proc/acpi/ibm/fan",
|
|
"format": "{0} [{1}]",
|
|
}
|
|
status.register(regex.Regex(regexsettings))
|
|
|
|
# The imap checker module
|
|
mailsettings = {
|
|
"color": "#ff0000",
|
|
"servers": [
|
|
{
|
|
"host": "www.testhost1.com",
|
|
"port": "993",
|
|
"ssl" : True,
|
|
"username": "your_username",
|
|
"password": "your_password",
|
|
"pause": 20
|
|
},
|
|
{
|
|
"host": "www.testhost2.net",
|
|
"port": "993",
|
|
"ssl" : True,
|
|
"username": "your_username",
|
|
"password": "your_password",
|
|
"pause": 20
|
|
}
|
|
]
|
|
}
|
|
mailchecker = mailchecker.MailChecker(mailsettings)
|
|
status.register_module(mailchecker)
|
|
|
|
# the mods.de forum new bookmarks module
|
|
mdesettings = {
|
|
"username": "your_username",
|
|
"password": "your_password"
|
|
}
|
|
mde = modsde.ModsDeChecker(mdesettings)
|
|
status.register_module(mde)
|
|
|
|
# the notmuch mail checker module
|
|
db_path = "path_to_your_notmuch_database"
|
|
nm = notmuch.NotmuchMailChecker(db_path)
|
|
status.register_module(nm)
|
|
|
|
|
|
# the thunderbird dbus new mail checker module
|
|
tb = thunderbirdnewmail.ThunderbirdMailChecker()
|
|
status.register_module(tb)
|
|
|
|
|
|
# the battery status checker module
|
|
battery = batterychecker.BatteryChecker()
|
|
status.register(battery)
|
|
|
|
|
|
# start the handler
|
|
status.run()
|