Rename timeout to update_interval
This commit is contained in:
parent
1742571b63
commit
5ee860ba8a
|
@ -40,9 +40,9 @@ Add the following to :file:`~/.config/qtile/config.py`:
|
||||||
screens = [
|
screens = [
|
||||||
Screen(
|
Screen(
|
||||||
top=Bar([
|
top=Bar([
|
||||||
PowerlineTextBox(timeout=2, side='left'),
|
PowerlineTextBox(update_interval=2, side='left'),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
PowerlineTextBox(timeout=2, side='right'),
|
PowerlineTextBox(update_interval=2, side='right'),
|
||||||
],
|
],
|
||||||
35 # width
|
35 # width
|
||||||
),
|
),
|
||||||
|
|
|
@ -13,10 +13,12 @@ class QTilePowerline(Powerline):
|
||||||
|
|
||||||
|
|
||||||
class PowerlineTextBox(TextBox):
|
class PowerlineTextBox(TextBox):
|
||||||
def __init__(self, timeout=2, text=' ', width=CALCULATED, side='right', **config):
|
# TODO Replace timeout argument with update_interval argument in next major
|
||||||
|
# release.
|
||||||
|
def __init__(self, timeout=2, text=b' ', width=CALCULATED, side='right', update_interval=None, **config):
|
||||||
super(PowerlineTextBox, self).__init__(text, width, **config)
|
super(PowerlineTextBox, self).__init__(text, width, **config)
|
||||||
self.side = side
|
self.side = side
|
||||||
self.update_interval = timeout
|
self.update_interval = update_interval or timeout
|
||||||
self.did_run_timer_setup = False
|
self.did_run_timer_setup = False
|
||||||
powerline = QTilePowerline(ext='wm', renderer_module='pango_markup')
|
powerline = QTilePowerline(ext='wm', renderer_module='pango_markup')
|
||||||
powerline.setup(self)
|
powerline.setup(self)
|
||||||
|
|
Loading…
Reference in New Issue