summaryrefslogtreecommitdiff
path: root/services/Drawers.qml
blob: 7e7d97aace5631ea24c22b806eddaf5db05f5d0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pragma Singleton

import Quickshell
import QtQuick

Singleton {
    id: root

    property var visibilities: Quickshell.screens.reduce((acc, s) => {
        acc[s] = visibleComp.createObject(root);
        return acc;
    }, {})

    property var positions: ({})
    property int rightExclusion

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

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

    Component {
        id: visibleComp

        QtObject {
            property bool launcher
            property bool osd
            property bool notifs
            property bool session
        }
    }
}