summaryrefslogtreecommitdiff
path: root/modules/bar/popouts/KbLayout.qml
blob: b12f2ef810be299a3be21382c993df5d37b4f113 (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
import qs.components
import qs.components.controls
import qs.services
import qs.config
import Quickshell
import QtQuick.Layouts

ColumnLayout {
    id: root

    spacing: Appearance.spacing.normal

    StyledText {
        Layout.topMargin: Appearance.padding.normal
        Layout.rightMargin: Appearance.padding.normal
        text: qsTr("Keyboard layout: %1").arg(Hypr.kbLayoutFull)
        font.weight: 500
    }

    TextButton {
        Layout.bottomMargin: Appearance.padding.normal
        Layout.rightMargin: Appearance.padding.normal
        Layout.fillWidth: true

        text: qsTr("Switch layout")
        onClicked: Quickshell.execDetached(["hyprctl", "switchxkblayout", "all", "next"])
    }
}