Repository navigation
Making minimised windows work like hidden ones, plus an optional "Minimised" OmniShell widget #894
Replies: 2 comments
|
@BarutSRB when you get a moment I'd appreciate your thoughts on this for overall direction. tl;dr, minimised windows handled like hidden with an icon in the bar, toggle optiion to move minimised windows to a special workspace in the bar which can then be restored on whichever active workspace when clicked. |
|
Step 1 is welcome against the shared workspaces widget; the click restoration already landed in #895. Step 2 overlaps scratchpads for transient windows, but automatically handling native minimization would be new behavior. I suggest deferring that until after 0.8.0, including its placement and restore API decisions. The minimize command can be considered separately. Sorry I'm just a bit busy with the release for 0.8.0 but 100% I'll look at it closer after the release. Thank you |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Hidden apps (⌘H) work really well in OmniWM. Minimised windows don't yet: you can't get one back from the workspace bar. I'd like to suggest two steps:
I'd like to agree the direction before writing step 2.
How hidden apps work today
workspaceswidget keeps the window under its workspace, marks it as hidden, and sorts it after visible apps.It's predictable and it fits a tiling workflow.
How minimised windows behave today
workspaceswidget shows it exactly like a normal window. Its data has ahiddenflag but nominimisedone.Step 1: make minimise behave like hidden
minimisedflag (and count) to theworkspaceswidget alongsidehidden, and give minimised windows their own marker, distinct from the hidden one, so you can see at a glance what's minimised.I have a small PR ready for the click part.
focusWindowFromBarclears the window's minimised state before focusing it, and it comes with tests. I'll open it separately, since it fixes today's behaviour whichever way this discussion goes. The bar marker would be a follow-up.Step 2: an optional "Minimised" widget
Some windows are transient: a chat, a download, a call, a log you want to glance at. For those, returning the window to wherever it came from isn't really what you want. You want to pull it onto the workspace in front of you, check it, and put it away again. That's also how macOS treats minimised windows by default: a window restored from the Dock appears on the Space you're on now.
The idea:
minimizedWindows.restoreTo = "origin" | "current". The default stays"origin"(step 1), so nothing changes for anyone who doesn't opt in."current", minimised windows leave their workspace's list in theworkspaceswidget and appear in a new bundledminimizedwidget instead. The widget shows the same list on every monitor's bar.setSystemStatsEnabledappendssystemStatsWidgetto the trailing lane if it isn't already placed. Here,shell.tomlwould nameminimizedWidget = "minimized", and enabling the option would add it afterworkspacesin the leading lane unless the user has already placed it. People who want it somewhere else can move it like any other widget.Why not a new kind of workspace? I thought about modelling this as a special workspace you can't switch to. But every workspace path would then need a guard: switching workspaces, moving windows, monitor assignment, layouts, IPC, swipes and overview. A minimised window already sits outside the layout. The only new decision is which workspace it goes back to when it's restored, so a widget plus a choice at restore time seems much simpler.
Hidden apps stay as they are. Hiding covers every window of an app at once, so "put them all back where they were" is right for hiding. If a window is minimised and its app is hidden, it sits in the Minimised widget. Clicking it brings back just that window, and the app's other windows reappear on their own workspaces.
Questions for maintainers
workspacesin the leading lane" a sensible default spot?floatingoption, or should the widget chain the existingwindow toggle-floatingandfocusrequests? I'd lean towards the single request, so the window never shows up tiled for a moment before it floats.Related: #143, #688
All reactions