wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.81k stars 798 forks source link

Add action SwitchToLastWorkspace #4938

Open Pajn opened 9 months ago

Pajn commented 9 months ago

Is your feature request related to a problem? Please describe. I'd want an action to switch to the last active workspace, similar to ActivateLastTab. The existing SwitchWorkspaceRelative is ordered lexicographically based on the name so it does not work when there are more than two workspaces.

Describe the solution you'd like Add action wezterm.action.SwitchToLastWorkspace or wezterm.action.SwitchWorkspaceLast (depending on which of the two preexisting actions the name should match)

Describe alternatives you've considered I haven't really considered any alternatives. It's probably doable by listening on update-status and maintaining the state within the config but it seems much more complicated than it should. Another option might be an event when the workspace is switched, slightly simplifying creating a custom action for this feature.

tjex commented 3 months ago

I just finished a solution for this, can check it out here: https://github.com/wez/wezterm/discussions/5833