def get_workspaces():
    handle = subprocess.Popen(['i3-msg', '-t', 'get_workspaces'], stdout=subprocess.PIPE)
    output = handle.communicate()[0]
    data = json.loads(output.decode())
    data = sorted(data, key=(lambda k: k['name']))
    arr = []
    for i in data:
        arr.append(i['name'])
    return arr
def get_workspaces():
    handle = subprocess.Popen(['i3-msg', '-t', 'get_workspaces'], stdout=subprocess.PIPE)
    output = handle.communicate()[0]
    data = json.loads(output.decode())
    data = sorted(data, key=(lambda k: k['name']))
    arr = []
    for i in data:
        arr.append(i['name'])
    return arr