@@ -473,30 +473,29 @@ def import_tmuxinator(session_config):
473
473
"rbenv shell %s" % session_config ["rbenv" ]
474
474
)
475
475
476
- for w in session_config ["windows" ]:
477
- for k , v in w .items ():
478
-
479
- windowdict = {"window_name" : k }
476
+ for window_config in session_config ["windows" ]:
477
+ for k , v in window_config .items ():
478
+ window_config = {"window_name" : k }
480
479
481
480
if isinstance (v , str ) or v is None :
482
- windowdict ["panes" ] = [v ]
483
- tmuxp_config ["windows" ].append (windowdict )
481
+ window_config ["panes" ] = [v ]
482
+ tmuxp_config ["windows" ].append (window_config )
484
483
continue
485
484
elif isinstance (v , list ):
486
- windowdict ["panes" ] = v
487
- tmuxp_config ["windows" ].append (windowdict )
485
+ window_config ["panes" ] = v
486
+ tmuxp_config ["windows" ].append (window_config )
488
487
continue
489
488
490
489
if "pre" in v :
491
- windowdict ["shell_command_before" ] = v ["pre" ]
490
+ window_config ["shell_command_before" ] = v ["pre" ]
492
491
if "panes" in v :
493
- windowdict ["panes" ] = v ["panes" ]
492
+ window_config ["panes" ] = v ["panes" ]
494
493
if "root" in v :
495
- windowdict ["start_directory" ] = v ["root" ]
494
+ window_config ["start_directory" ] = v ["root" ]
496
495
497
496
if "layout" in v :
498
- windowdict ["layout" ] = v ["layout" ]
499
- tmuxp_config ["windows" ].append (windowdict )
497
+ window_config ["layout" ] = v ["layout" ]
498
+ tmuxp_config ["windows" ].append (window_config )
500
499
return tmuxp_config
501
500
502
501
0 commit comments