[modules] Add module "date" as alias of "time"
The "time" module now has an alias (symlink) called "date". This is used to differentiate a widget showing the time from a widget showing the date.
This commit is contained in:
parent
23617fbdb7
commit
6278a4e564
2 changed files with 6 additions and 1 deletions
1
bumblebee/modules/date.py
Symbolic link
1
bumblebee/modules/date.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
time.py
|
|
@ -3,7 +3,11 @@ import bumblebee.module
|
|||
|
||||
class Module(bumblebee.module.Module):
|
||||
def __init__(self, args):
|
||||
self._fmt = args[0] if args else "%x %X"
|
||||
module = self.__module__.split(".")[-1]
|
||||
|
||||
default = "%x" if module == "date" else "%X"
|
||||
self._fmt = args[0] if args else default
|
||||
|
||||
super(Module, self).__init__(args)
|
||||
|
||||
def data(self):
|
||||
|
|
Loading…
Reference in a new issue