handle conf params more robustly again
This commit is contained in:
parent
bd72122b95
commit
1374bc0626
@ -10,9 +10,6 @@ class Window(object):
|
||||
self.conf = conf
|
||||
self.count = 0
|
||||
self.connection = None
|
||||
self.fgcolor = ''.join(map(lambda x: '%02x' % int(0xFF * x),
|
||||
self.conf['fgcolor']))
|
||||
self.font_sz = int(1024 * self.conf['font_size'])
|
||||
|
||||
if not 'width' in self.conf:
|
||||
self.conf['width'] = 32
|
||||
@ -32,6 +29,9 @@ class Window(object):
|
||||
self.conf['flash_rate'] = 3000
|
||||
if not 'font_size' in self.conf:
|
||||
self.conf['font_size'] = 18
|
||||
self.font_sz = int(1024 * self.conf['font_size'])
|
||||
self.fgcolor = ''.join(map(lambda x: '%02x' % int(0xFF * x),
|
||||
self.conf['fgcolor']))
|
||||
sticky = True
|
||||
if 'sticky' in self.conf:
|
||||
sticky = self.conf['sticky']
|
||||
|
Loading…
x
Reference in New Issue
Block a user