Stuff
This commit is contained in:
parent
f9849dfcfa
commit
84967eac60
27 changed files with 180 additions and 25 deletions
|
@ -44,8 +44,8 @@ def randomColor(seed=0):
|
|||
class TimeProvider(StatefulSection, PeriodicUpdater):
|
||||
|
||||
FORMATS = ["%H:%M",
|
||||
"%d/%m %H:%M:%S",
|
||||
"%a %d/%m/%y %H:%M:%S"]
|
||||
"%m-%d %H:%M:%S",
|
||||
"%a %y-%m-%d %H:%M:%S"]
|
||||
NUMBER_STATES = len(FORMATS)
|
||||
DEFAULT_STATE = 1
|
||||
|
||||
|
@ -666,11 +666,20 @@ class I3WorkspacesProviderSection(Section):
|
|||
self.parent = parent
|
||||
self.setName(name)
|
||||
self.setDecorators(clickLeft=self.switchTo)
|
||||
self.tempText = None
|
||||
|
||||
def empty(self):
|
||||
self.updateTheme(self.parent.themeNormal)
|
||||
self.updateText(None)
|
||||
|
||||
def tempShow(self):
|
||||
self.updateText(self.tempText)
|
||||
|
||||
def tempEmpty(self):
|
||||
self.tempText = self.dstText[1]
|
||||
self.updateText(None)
|
||||
|
||||
|
||||
|
||||
class I3WorkspacesProvider(Section, I3Updater):
|
||||
# TODO FEAT Multi-screen
|
||||
|
@ -735,11 +744,11 @@ class I3WorkspacesProvider(Section, I3Updater):
|
|||
if e.change == 'default':
|
||||
self.modeSection.updateText(None)
|
||||
for section in self.sections.values():
|
||||
section.show()
|
||||
section.tempShow()
|
||||
else:
|
||||
self.modeSection.updateText(e.change)
|
||||
for section in self.sections.values():
|
||||
section.empty()
|
||||
section.tempEmpty()
|
||||
|
||||
def __init__(self, theme=0, themeFocus=3, themeUrgent=1, themeMode=2, customNames=dict()):
|
||||
I3Updater.__init__(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue