summaryrefslogtreecommitdiff
path: root/modules/bar/Bar.qml
blob: 4015003beb6b670015ebb505619aad10677d50d2 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import "root:/widgets"
import "root:/config"
import Quickshell
import Quickshell.Wayland
import QtQuick

Variants {
    model: Quickshell.screens

    WlrLayershell {
        id: win

        required property ShellScreen modelData
        readonly property bool vertical: BarConfig.vertical

        screen: modelData
        namespace: "caelestia-bar"
        color: "transparent"

        anchors.top: true
        anchors.left: true
        anchors.right: !vertical
        anchors.bottom: vertical

        width: contents.implicitWidth
        height: contents.implicitHeight

        Box {
            id: contents

            padding: [Appearance.padding.normal, Appearance.padding.large, 0, Appearance.padding.large]

            BoxLayout {
                vertical: win.vertical
                spacing: Appearance.spacing.larger
                padding: [Appearance.padding.smaller, Appearance.padding.large]
                color: Appearance.alpha(Appearance.colours.base, false)
                radius: Appearance.rounding.small

                OsIcon {}

                Clock {
                    vertical: win.vertical
                }

                ActiveWindow {
                    vertical: win.vertical
                }

                // Workspaces {
                //     vertical: win.vertical
                // }
            }
        }
    }
}