SUMMARY I'm using the Karousel KWin script, so my windows are for the most part non-overlapping and arranged as a row. This is a most extreme condition, but other tiling setups as well as floating setups could benefit from this as well, if not as dramatically. As I hop focus along the windows (or move them), left to right and back again, it would be great to have the (icons only) task manager arrange the icons in the same order, so I could see where I am along the whole row of apps, and know which way to travel to certain items (often off-screen). So this request is to either add a new sort option, or integrate into an existing sort option ("by desktop"), sorting by the x coordinates of the window. Ties would have to be broken and I wouldn't care how -- but I would expect vertically higher windows to come before vertically lower ones. The benefit would be especially appreciated when scrolling over the task manager to move focus from window to window. ALTERNATIVELY Another approach for my case could be to make no changes to the task manager, keeping it in manual sorting mode, and add functionality to Karousel to adjust this manual sorting on its end. STEPS TO REPRODUCE 1. Open a few windows side by side 2. Have a horizontal task manager visible 3. Shuffle the horizontal arrangement of the windows OBSERVED RESULT On any of the sort settings, the order of icons/tasks displayed will not match the relative horizontal placement of the windows. EXPECTED RESULT The task order could be kept in sync with the relative horizontal placement of the windows. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.1 ADDITIONAL INFORMATION
I can see the value of this request. I'm not sure how difficult it would be to implement, I'll let someone more familiar with the code answer that.
This is an interesting idea, but I don't think we'll be able to do it. It only makes sense when windows are arranged in exactly that horizontal way, and also only when the Task Manager is the same orientation. For all other scenarios, it wouldn't make any sense. As such, I think this is too niche to implement given the existing complexity of the Task Manager's code base. Thanks anyway for the idea, though!
It's certainly not *only* useful for horizontal task managers: I have a vertical task manager displaying the full window titles, and it would be great to scroll over that and move in sequence through the windows, rather than jump around (as well as see a sort of minimap of the window order). And I'd argue it's also not *only* useful for that exact window arrangement -- again, especially for the action of scrolling over the task manager, and seeing even floating overlapping windows get focus in a continuous spatial order, rather than haphazardly around the screen. Is it possible for a kwin script to reorder windows in the task managers set to manual sorting?
I managed to implement this as a fallback sorting within the virtual desktop sorting mode, and it seems to work great. The change as I made it doesn't seem very complicated, and might even be simplified by someone who actually knows C++/Qt/Plasma development. Diff on GitHub: https://github.com/KDE/plasma-workspace/compare/v6.2.5...AndydeCleyre:plasma-workspace:feature/499175 I tested using this PKGBUILD on Arch Linux: GitHub Gist: https://gist.github.com/AndydeCleyre/1c95574f8de446d015115854c74ad823 Raw: https://gist.githubusercontent.com/AndydeCleyre/1c95574f8de446d015115854c74ad823/raw/275f46c8f6425103e7e92b81050b08dd5f31aff6/PKGBUILD
Now that I'm using it, I think it shines *best* with a one-column task manager on a vertical panel.
I feel this was closed hastily after assertions that: - it only benefits horizontally tiled windows - it only benefits horizontally oriented task managers I think both those assertions are false. Is there any chance this can be re-opened for a little further examination? Since it's implemented in my branch, maybe some folks can try it out?
If you have a patch, it's probably better to submit and discuss it in a invent.kde.org merge request, rather than in a closed bug report.
Yeah, it's easier to assess viability in the form of something actionable like a patch one can test. Make sure to wire up the config window too, so the user can switch between this new sorting mode and the other existing ones.
Thanks, I'll resubmit there. Regarding the config item: I didn't implement it as its own sorting method alternative, but rather as fallback behavior in the sort-by-desktop method. This makes sense to me, since 1) whatever fallback method is used for windows on the same desktop in this mode is already undefined by the user and 2) when sorting by horizontal position it would only make sense if windows were already sorted by desktop, first.
I've filled out a merge request form, but am not able to submit it, as the Create Merge Request button at the bottom is disabled, with no indication of the reason.
Ah ok after refreshing and trying again it was enabled, and the request can now be found at https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5134
Thanks for submitting the merge request! If you run into further issues with Invent, we welcome you to join the KDE Matrix space where there are rooms for development topics. If you're interested, take a look at https://community.kde.org/Get_Involved.