summaryrefslogtreecommitdiff
path: root/services/Drawers.qml
blob: ac88b6cf1c8357120378fe8b019acae745dd6d95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pragma Singleton

import Quickshell

Singleton {
    id: root

    property var positions: ({})
    property int rightExclusion

    signal posChanged(screen: ShellScreen, x: int, y: int)

    function getPosForScreen(screen: ShellScreen): point {
        return positions[screen] || Qt.point(0, 0);
    }

    function setPosForScreen(screen: ShellScreen, x: int, y: int): void {
        positions[screen] = Qt.point(x, y);
        posChanged(screen, x, y);
    }
}