added week calculations, refactor mocks

This commit is contained in:
Mariano Ramon
2020-05-17 10:14:29 -03:00
parent 3e073a0e4b
commit 59964dcab3
6 changed files with 110 additions and 4 deletions

14
dmapp/dmcore/__init__.py Normal file
View File

@@ -0,0 +1,14 @@
class ActiveDesktop:
def __init__(self, desktops, unlabeled = "Other"):
self.desktops = desktops
def active_workspace():
workspaces = subprocess.check_output(["wmctrl", "-d"]) \
.decode("utf-8").strip("\n").split("\n")
for workspace in workspaces:
if workspace[3] == "*":
return int(workspace[0])