File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 9
9
# check if workspaces are all in order
10
10
def workspaces_ordered (i3conn ):
11
11
last_workspace = 0
12
- for i in sorted (i3conn .get_workspaces (), key = lambda x : x [ ' num' ] ):
13
- number = int (i [ ' num' ] )
12
+ for i in sorted (i3conn .get_workspaces (), key = lambda x : x . num ):
13
+ number = int (i . num )
14
14
if number != last_workspace + 1 :
15
15
return False
16
16
last_workspace += 1
@@ -22,11 +22,11 @@ def workspaces_ordered(i3conn):
22
22
def find_disordered (i3conn ):
23
23
disordered = []
24
24
least_number = None
25
- workspaces = sorted (i3conn .get_workspaces (), key = lambda x : x [ ' num' ] )
26
- occupied_workspaces = [int (x [ ' num' ] ) for x in workspaces ]
25
+ workspaces = sorted (i3conn .get_workspaces (), key = lambda x : x . num )
26
+ occupied_workspaces = [int (x . num ) for x in workspaces ]
27
27
last_workspace = 0
28
28
for i in workspaces :
29
- number = int (i [ ' num' ] )
29
+ number = int (i . num )
30
30
if number != last_workspace + 1 :
31
31
disordered .append (number )
32
32
if least_number is None and last_workspace + 1 not in occupied_workspaces :
You can’t perform that action at this time.
0 commit comments