Skip to content

Commit d44f0ac

Browse files
committed
add section about callbacks
1 parent 4e69657 commit d44f0ac

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ Adding the path as a part of the right-status can be done with the `smart_worksp
8686
}))
8787
end)
8888
```
89+
90+
#### Callbacks when switching workspace
91+
Use the `smart_workspace_switcher.workspace_chosen` event which is emitted when choosing the workspace to add a callback function.
92+
```lua
93+
wezterm.on("smart_workspace_switcher.workspace_chosen", function(window, path)
94+
wezterm.log_info("THIS IS EMITTED FROM THE CALLBACK")
95+
end)
96+
```
97+
8998
#### Workspace formatter
9099
Set a custom workspace formatter, see [Wezterm formatting docs](https://wezfurlong.org/wezterm/config/lua/wezterm/format.html)
91100

0 commit comments

Comments
 (0)