a fully functional version
This commit is contained in:
parent
c272a21aa7
commit
9bcfcaf177
7 changed files with 135 additions and 33 deletions
23
vdstatus_i3
23
vdstatus_i3
|
@ -1,10 +1,21 @@
|
|||
#!/usr/bin/python3 -u
|
||||
import json
|
||||
from sys import argv
|
||||
import argparse
|
||||
import vdstatus
|
||||
import time
|
||||
|
||||
|
||||
print('{"version":1}')
|
||||
print('[')
|
||||
while True:
|
||||
vdstatus.run_plugins()
|
||||
def parse_arguments(arguments=argv[1:]):
|
||||
desc = ('A simple i3status replacement, '
|
||||
'and more. Warning: WIP, may be broken.')
|
||||
p = argparse.ArgumentParser(description=desc)
|
||||
p.add_argument('-c', '--config', help='configuration file')
|
||||
|
||||
return p.parse_args(arguments)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = parse_arguments()
|
||||
if args.config is not None:
|
||||
vdstatus.run_plugins(args.config)
|
||||
else:
|
||||
vdstatus.run_plugins()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue