diff --git a/bumblebee_status/modules/contrib/calendar.py b/bumblebee_status/modules/contrib/calendar.py new file mode 100644 index 0000000..0c66ce5 --- /dev/null +++ b/bumblebee_status/modules/contrib/calendar.py @@ -0,0 +1,24 @@ +"""Displays date, opens a gnome-calendar on click + +Parameters: + * calendar.format: strftime()-compatible formatting string + * calendar.locale: locale to use rather than the system default +""" + +import core.decorators +from ..core.datetime import Module + +import core.input + + +class Module(Module): + @core.decorators.every(hours=1) + def __init__(self, config, theme): + super().__init__(config, theme) + core.input.register(self, button=core.input.LEFT_MOUSE, cmd="gnome-calendar") + + def default_format(self): + return "%x" + + +# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4