Skip to content

Instantly share code, notes, and snippets.

/dropbox.py

Created Jan 21, 2016
Embed
What would you like to do?
powerline/segments/dropbox.py
#!/usr/bin/env python
from powerline.lib.shell import run_cmd
## Requires dropbox-cli and FontAwesome
def status(pl):
status = run_cmd(pl, ['dropbox-cli', 'status']).rstrip()
if status == 'Up to date':
return [
{
'contents': '\uf16b',
'highlight_groups': ['dropbox'],
'draw_inner_divider': True
}
]
else:
return [
{
'contents': '\uf021',
'highlight_groups': ['dropbox:syncing'],
'draw_inner_divider': True
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment