8000 Opt in for a callback when WMUX is about to be closed · Issue #227 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

Opt in for a callback when WMUX is about to be closed #227

Closed

Description

@arnonuem

What are you trying to do?

I had a data loss when i accidently hit the red X button on wmux because it did what it is supposed to do. It closed and with that i had no more access to my running sessions (clearly my fault). But this happened accidently because my pc was running at limit where i could barely move my mouse pointer.

What would you like wmux to do?

I would love to have an opt in feature like this:

  • activate ask user whether to really close the whole wmux application

I understand that this should not be imposed on every user but for me it would be a very critical safety net (did not happen only once :/) - so my suggestion is a kind of OPT IN setting for this. Which when activated forces wmux to stay open until the user confirmed in the confirm dialog.

What do you do today instead?

No response

Activity

  1. amirlehmam commented on Sep 9, 2026

    @amirlehmam
    Owner

    Done in v2.10.2: Settings → Workspaces → "Confirm before closing wmux", off by default exactly as you suggested.

    When it is on, the window's × button, Alt+F4 and the close-window shortcut all put up a dialog first — "Quit wmux? N terminal sessions will be terminated, including any agents running in them" — with Cancel as the default button, so a stray Enter right after the stray click cannot confirm it either. A second click on × while the dialog is up is ignored rather than opening a second dialog.

    Two details worth knowing:

    • The dialog is a native Windows dialog drawn by the main process, not part of the wmux page. That was a deliberate choice because of how you hit this: on a machine that loaded, the UI itself may be the thing not responding, and a native modal needs nothing from the page to appear or to answer.
    • It never gets in the way of an update installing, a restart wmux asks for itself, or Windows shutting down — those go through without asking. wmux close-window from the CLI also never prompts, same rule as the existing "confirm before closing a session" guard.

    Sorry about the lost sessions. For what it is worth, the layout comes back on the next launch; it is the processes that do not, and this is the switch that stops that happening by accident.

  2. added a commit that references this issue on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0