picker: sort fullscreen clients second
This commit is contained in:
parent
5d513eeb25
commit
c901d16841
1 changed files with 4 additions and 6 deletions
|
|
@ -39,12 +39,10 @@ MouseArea {
|
||||||
property list<var> clients: {
|
property list<var> clients: {
|
||||||
const ws = Hyprland.activeToplevel?.workspace?.id ?? Hyprland.activeWsId;
|
const ws = Hyprland.activeToplevel?.workspace?.id ?? Hyprland.activeWsId;
|
||||||
return Hyprland.toplevels.values.filter(c => c.workspace?.id === ws).sort((a, b) => {
|
return Hyprland.toplevels.values.filter(c => c.workspace?.id === ws).sort((a, b) => {
|
||||||
// Pinned first, then floating, then any other
|
// Pinned first, then fullscreen, then floating, then any other
|
||||||
if (a.lastIpcObject.pinned === b.lastIpcObject.pinned)
|
const ac = a.lastIpcObject;
|
||||||
return a.lastIpcObject.floating === b.lastIpcObject.floating ? 0 : a.lastIpcObject.floating ? -1 : 1;
|
const bc = b.lastIpcObject;
|
||||||
if (a.lastIpcObject.pinned)
|
return (bc.pinned - ac.pinned) || ((bc.fullscreen !== 0) - (ac.fullscreen !== 0)) || (bc.floating - ac.floating);
|
||||||
return -1;
|
|
||||||
return 1;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue