1
0
Fork 0

Update panel config

This commit is contained in:
Jeremy Kaplan 2016-06-06 14:56:58 -04:00
commit de32e10a94
2 changed files with 4 additions and 2 deletions

View file

@ -43,6 +43,7 @@ def status_update(data):
'T': None, # focused node state
'G': None, # focused node active flags
}
data = data.decode('utf-8')
assert data[0] == 'W'
data = data[1:-1]
@ -69,7 +70,7 @@ def volume_update(_):
volume, mute, _ = info.split(' ')
volume = int(volume)
muted = mute == 'yes'
mute_icon = "-" if muted else "%%"
mute_icon = "-" if muted else "%"
kwargs = {}
if not muted:
kwargs['bg'] = COLOR_WARNING_BG
@ -95,7 +96,7 @@ def battery_update(_):
colors = {}
if state != 'Charging' and charge < 5:
colors['bg'] = COLOR_URGENT_BG
return 'battery', color_string("%s %d%%%%" % (state, charge), **colors)
return 'battery', color_string("%s %d%%" % (state, charge), **colors)
def make_string(status, clock, volume, battery, wifi):