8000 Close to tray: keep sessions alive when the window is closed · Issue #442 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

Close to tray: keep sessions alive when the window is closed #442

Closed

Description

@r4yb3l

What are you trying to do?

I run long-lived agent sessions in wmux and I keep closing the window by accident (the × button or Alt+F4). Closing the window quits the app and kills every PTY in it, agents included.

confirmAppClose (#227) helps, and I have it on. But sometimes I really do want the window out of the way without losing the sessions, and today the only choices are to keep it on the taskbar or to end everything.

What would you like wmux to do?

An opt-in Close to tray setting (off by default, like confirmAppClose):

  • With it on, the window × / Alt+F4 hides the window instead of quitting. The main process, PTYs and agents keep running.
  • A system tray icon with Show wmux, Quit wmux, and click-to-restore.
  • Quit wmux in the tray menu, updates, restarts and Windows shutdown still quit for real, using the same bypass path confirmAppClose already has.
  • Optional: a tray notification when an agent finishes or needs input while the window is hidden.

The close handler in window-manager already intercepts the window close event for confirmAppClose, so this could be one more branch there (hide() instead of allow) plus an Electron Tray.

What do you do today instead?

I turned on "Confirm before closing wmux" and I keep the window minimized to the taskbar. It stops accidental quits, but there is no way to get the window off the taskbar and keep the sessions running.

Activity

  1. added a commit that references this issue on Nov 7, 2026
  2. amirlehmam commented on Nov 7, 2026

    @amirlehmam
    Owner

    Added as an opt-in Close to tray setting, next to Confirm before closing wmux (Settings → Workspace). With it on, × or Alt+F4 on your last visible wmux window hides it to the system tray instead of quitting, and every terminal and agent keeps running. Click the tray icon, or launch wmux again, to bring it back. Quit wmux in the tray menu, updates, restarts and Windows shutdown still quit for real. Hiding ends nothing, so there's no confirmation prompt. The tray icon only appears while a window is hidden. Done in 5a9cf39, shipping in 2.59.0.

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