<s> import i3ipc <EOL> import re <EOL> from argparse import ArgumentParser <EOL> def main ( ) : <EOL> parser = ArgumentParser ( description = '''<STR_LIT>''' ) <EOL> parser . parse_args ( ) <EOL> i3 = i3ipc . Connection ( ) <EOL> workspaces = i3 . get_workspaces ( ) <EOL> numbered_workspaces = filter ( lambda w : w . name [ <NUM_LIT:0> ] . isdigit ( ) , workspaces ) <EOL> numbers = list ( map ( lambda w : int ( re . search ( r'<STR_LIT>' , w . name ) . group ( <NUM_LIT:0> ) ) , numbered_workspaces ) ) <EOL> new = <NUM_LIT:0> <EOL> for i in range ( <NUM_LIT:1> , max ( numbers ) + <NUM_LIT:2> ) : <EOL> if i not in numbers : <EOL> new = i <EOL> break <EOL> i3 . command ( "<STR_LIT>" % new ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
