dock: only show on rightmost screen
This commit is contained in:
parent
a660da8f25
commit
f57dd0ea5a
1 changed files with 11 additions and 2 deletions
|
|
@ -17,6 +17,15 @@ ShellRoot {
|
|||
id: scope
|
||||
required property var modelData
|
||||
|
||||
readonly property bool _isRightmost: {
|
||||
let maxX = -Infinity;
|
||||
for (let i = 0; i < Quickshell.screens.length; i++) {
|
||||
if (Quickshell.screens[i].x > maxX)
|
||||
maxX = Quickshell.screens[i].x;
|
||||
}
|
||||
return scope.modelData.x >= maxX;
|
||||
}
|
||||
|
||||
Bar {
|
||||
screen: scope.modelData
|
||||
}
|
||||
|
|
@ -61,14 +70,14 @@ ShellRoot {
|
|||
}
|
||||
|
||||
LazyLoader {
|
||||
active: Modules.dock.enable
|
||||
active: Modules.dock.enable && scope._isRightmost
|
||||
Dock.AppletDock {
|
||||
screen: scope.modelData
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
active: Modules.dock.enable
|
||||
active: Modules.dock.enable && scope._isRightmost
|
||||
Dock.DockEdgeTrigger {
|
||||
screen: scope.modelData
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue