Skip to content

Commit 29a7014

Browse files
committed
Merge pull request #79 from apieum/patch-1
Keeping pane and window focus when freeze
2 parents 53fa3e3 + f9a5155 commit 29a7014

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tmuxp/workspacebuilder.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ def freeze(session):
287287
wconf['window_name'] = w.get('window_name')
288288
wconf['layout'] = w.get('window_layout')
289289
wconf['panes'] = []
290+
if w.get('window_active', '0') == '1':
291+
wconf['focus']='true'
290292

291293
# If all panes have same path, set 'start_directory' instead
292294
# of using 'cd' shell commands.
@@ -306,6 +308,9 @@ def freeze(session):
306308
pconf['shell_command'].append(
307309
'cd ' + p.get('pane_current_path')
308310
)
311+
312+
if p.get('pane_active', '0') == '1':
313+
pconf['focus']='true'
309314

310315
current_cmd = p.get('pane_current_command')
311316

0 commit comments

Comments
 (0)