From 6197b3e8c3756b91061b2920636a306342d98540 Mon Sep 17 00:00:00 2001 From: surbhitt Date: Sun, 1 Oct 2023 17:48:46 +0530 Subject: [PATCH] adding the calendar.py module same as date.py but opens the gnome-calendar on click --- bumblebee_status/modules/contrib/calendar.py | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 bumblebee_status/modules/contrib/calendar.py 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