added week calculations, refactor mocks
This commit is contained in:
14
dmapp/dmcore/__init__.py
Normal file
14
dmapp/dmcore/__init__.py
Normal 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])
|
||||
Reference in New Issue
Block a user