We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 345a23c commit 9bf267aCopy full SHA for 9bf267a
tmuxp/cli.py
@@ -162,6 +162,7 @@ def set_layout_hook(session, hook_name):
162
"""
163
cmd = ['set-hook', '-t', session.id, hook_name]
164
hook_cmd = []
165
+ attached_window = session.attached_window
166
for window in session.windows:
167
# unfortunately, select-layout won't work unless
168
# we've literally selected the window at least once
@@ -177,6 +178,7 @@ def set_layout_hook(session, hook_name):
177
178
target_session=session.id, hook_name=hook_name
179
)
180
181
+ hook_cmd.append('selectw -t {}'.format(attached_window.id))
182
183
# join the hook's commands with semicolons
184
hook_cmd = '{}'.format('; '.join(hook_cmd))
0 commit comments