summaryrefslogtreecommitdiff
path: root/modules/bar/components/ActiveWindow.qml
blob: 24edb9ed8248f5a0f881cbcca6bde0ea90c0a22e (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
import "root:/widgets"
import "root:/services"
import "root:/utils"
import "root:/config"
import QtQuick
import QtQuick.Layouts

Box {
    id: root

    readonly property color colour: Appearance.colours.pink

    padding: [Appearance.padding.smaller, 0]
    animated: true
    clip: true

    MaterialIcon {
        id: icon

        text: Icons.getAppCategoryIcon(Hyprland.activeClient?.class) ?? "desktop_windows"
        color: root.colour
    }

    StyledText {
        text: Hyprland.activeClient?.title ?? "Desktop"
        font.pointSize: Appearance.font.size.smaller
        font.family: Appearance.font.family.mono
        color: root.colour
        rotation: root.vertical ? 90 : 0

        anchors.left: icon.right
        anchors.leftMargin: Appearance.padding.smaller
    }
}