@requires_segment_info
def workspaces(pl, segment_info, only_show=None, output=None, strip=0):
 output = (output or segment_info.get(u'output'))
 return [{u'contents': w[u'name'][strip:], u'highlight_groups': workspace_groups(w)} for w in get_i3_connection().get_workspaces() if (((not only_show) or any((w[typ] for typ in only_show))) and ((not output) or (w[u'output'] == output)))]

@ requires_segment_info def workspaces ( pl , segment_info , only_show = None , output = None , strip = 0 ) : output = ( output or segment_info . get ( u'output' ) ) return [ { u'contents' : w [ u'name' ] [ strip : ] , u'highlight_groups' : workspace_groups ( w ) } for w in get_i3_connection ( ) . get_workspaces ( ) if ( ( ( not only_show ) or any ( ( w [ typ ] for typ in only_show ) ) ) and ( ( not output ) or ( w [ u'output' ] == output ) ) ) ]
return list of used workspaces .