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

import Quickshell

Singleton {
    id: root

    property var positions: ({})

    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);
    }
}