Update panel_bar for new netctl-auto version
This commit is contained in:
parent
88fc38c1b3
commit
14140c6dc7
1 changed files with 5 additions and 4 deletions
|
|
@ -77,10 +77,11 @@ def volume_update(_):
|
||||||
return 'volume', color_string("Vol: %d%s" % (volume, mute_icon), **kwargs)
|
return 'volume', color_string("Vol: %d%s" % (volume, mute_icon), **kwargs)
|
||||||
|
|
||||||
def wifi_update(_):
|
def wifi_update(_):
|
||||||
info = subprocess.check_output(['netctl-auto', 'current'])
|
info = subprocess.check_output(['netctl-auto', 'list'])
|
||||||
info = info[:-1].decode('utf-8')
|
active = [line for line in info.splitlines() if line[0] == '*']
|
||||||
if info:
|
|
||||||
interface, network = info.split('-', 1)
|
if active:
|
||||||
|
interface, network = active[0].split('-', 1)
|
||||||
else:
|
else:
|
||||||
interface, network = 'wlp2s0', '-'
|
interface, network = 'wlp2s0', '-'
|
||||||
return 'wifi', color_string('{}: {}'.format(interface, network))
|
return 'wifi', color_string('{}: {}'.format(interface, network))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue