Skip to content

Commit 7cc31f0

Browse files
committed
set_layout_hook: Use target keyword
1 parent 55906e0 commit 7cc31f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tmuxp/cli/load.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def set_layout_hook(session: Session, hook_name: str) -> None:
8080
hook name to bind to, e.g. 'client-attached'
8181
"""
8282
assert session.id is not None
83-
cmd: t.List[str] = ["set-hook", "-t", str(session.id), hook_name]
83+
cmd: t.List[str] = ["set-hook", hook_name]
8484
hook_cmd = []
8585
active_window = session.active_window
8686
for window in session.windows:
@@ -103,7 +103,7 @@ def set_layout_hook(session: Session, hook_name: str) -> None:
103103
cmd.append(_hook_cmd)
104104

105105
# create the hook
106-
session.cmd(*cmd)
106+
session.cmd(*cmd, target=session.id)
107107

108108

109109
def load_plugins(session_config: t.Dict[str, t.Any]) -> t.List[t.Any]:

0 commit comments

Comments
 (0)