Compare commits
No commits in common. "6e80934f75a23a4573bfdb7e35d3e27db0dcce1b" and "cb5a27847054055ac58111467d16feacd69763b6" have entirely different histories.
6e80934f75
...
cb5a278470
|
@ -54,16 +54,6 @@ def filemodfactory(filename: str, modname: str):
|
||||||
|
|
||||||
return filemod
|
return filemod
|
||||||
|
|
||||||
def new_mail(queue, _):
|
|
||||||
while True:
|
|
||||||
dir_output = os.listdir("/home/usr/Mail/main/INBOX/new")
|
|
||||||
dir_output = len(dir_output)
|
|
||||||
queue.put({
|
|
||||||
"module": "newmail",
|
|
||||||
"data": str(dir_output)
|
|
||||||
})
|
|
||||||
time.sleep(20)
|
|
||||||
|
|
||||||
def bspwm(queue, monitor):
|
def bspwm(queue, monitor):
|
||||||
client = socket.socket(
|
client = socket.socket(
|
||||||
socket.AF_UNIX,
|
socket.AF_UNIX,
|
||||||
|
@ -122,7 +112,7 @@ def render(modules) -> str:
|
||||||
columns, _ = os.get_terminal_size(0)
|
columns, _ = os.get_terminal_size(0)
|
||||||
|
|
||||||
left = "{} | {}({})".format(modules["clock"], modules["bspwm"], modules["sxhkdmode"])
|
left = "{} | {}({})".format(modules["clock"], modules["bspwm"], modules["sxhkdmode"])
|
||||||
right = "{} {}({})".format(modules["newmail"], modules["bat"], modules["batstat"])
|
right = "{}({})".format(modules["bat"], modules["batstat"])
|
||||||
padding = " " * (columns - len(left) - len(right) - 0)
|
padding = " " * (columns - len(left) - len(right) - 0)
|
||||||
|
|
||||||
output = left + padding + right
|
output = left + padding + right
|
||||||
|
@ -173,7 +163,7 @@ def main():
|
||||||
))
|
))
|
||||||
return
|
return
|
||||||
queue = Queue()
|
queue = Queue()
|
||||||
modules = [bspwm, clock, battery, batterystatus, sxhkdmode, new_mail]
|
modules = [bspwm, clock, battery, batterystatus, sxhkdmode]
|
||||||
[Process(target=module, args=(queue, argv[1])).start() for module in modules]
|
[Process(target=module, args=(queue, argv[1])).start() for module in modules]
|
||||||
|
|
||||||
module_outputs = defaultdict(lambda: "")
|
module_outputs = defaultdict(lambda: "")
|
||||||
|
|
Loading…
Reference in New Issue