adding the calendar.py module same as date.py but opens the gnome-calendar on click
This commit is contained in:
parent
8583b5123e
commit
6197b3e8c3
1 changed files with 24 additions and 0 deletions
24
bumblebee_status/modules/contrib/calendar.py
Normal file
24
bumblebee_status/modules/contrib/calendar.py
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue