Make panel portable
This commit is contained in:
parent
4684292fda
commit
28d0527b54
1 changed files with 5 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ def wifi_update(_):
|
||||||
if active:
|
if active:
|
||||||
interface, network = active[0].split('-', 1)
|
interface, network = active[0].split('-', 1)
|
||||||
else:
|
else:
|
||||||
interface, network = 'wlp2s0', '-'
|
interface, network = 'none', '-'
|
||||||
return 'wifi', color_string('{}: {}'.format(interface, network))
|
return 'wifi', color_string('{}: {}'.format(interface, network))
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -111,7 +111,10 @@ def mail_update(_):
|
||||||
'mit': '#000099',
|
'mit': '#000099',
|
||||||
}
|
}
|
||||||
for account, color in sorted(account_colors.items()):
|
for account, color in sorted(account_colors.items()):
|
||||||
mail_path = os.path.expanduser('~/.mail/{}/Inbox/new'.format(account))
|
try:
|
||||||
|
mail_path = os.path.expanduser('~/.mail/{}/Inbox/new'.format(account))
|
||||||
|
except FileNotFoundError:
|
||||||
|
continue
|
||||||
message_count = len(os.listdir(mail_path))
|
message_count = len(os.listdir(mail_path))
|
||||||
colors = {}
|
colors = {}
|
||||||
if message_count:
|
if message_count:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue