Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/UtilitiesConfig.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ JsonObject {
property bool audioInputChanged: true
property bool capsLockChanged: true
property bool numLockChanged: true
property bool keyboardLayoutChanged: true
}
}
43 changes: 35 additions & 8 deletions modules/bar/popouts/KbLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,39 @@ ColumnLayout {
font.weight: 500
}

TextButton {
Layout.bottomMargin: Appearance.padding.normal
Layout.rightMargin: Appearance.padding.normal
Layout.fillWidth: true
StyledRect {
Layout.topMargin: Appearance.spacing.small

text: qsTr("Switch layout")
onClicked: Hypr.extras.message("switchxkblayout all next")
}
}
implicitWidth: expandBtn.implicitWidth + Appearance.padding.normal * 2
implicitHeight: expandBtn.implicitHeight + Appearance.padding.small

Layout.fillWidth: true

radius: Appearance.rounding.normal
color: Colours.palette.m3primaryContainer

StateLayer {
color: Colours.palette.m3onPrimaryContainer
onClicked: Hypr.extras.message("switchxkblayout all next")
}

RowLayout {
id: expandBtn

anchors.centerIn: parent
spacing: Appearance.spacing.small

MaterialIcon {
Layout.leftMargin: Appearance.padding.smaller
text: "keyboard"
color: Colours.palette.m3onPrimaryContainer
font.pointSize: Appearance.font.size.large
}

StyledText {
text: qsTr("Switch layout")
color: Colours.palette.m3onPrimaryContainer
}
}
}
}
11 changes: 11 additions & 0 deletions services/Notifs.qml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ Singleton {
}
}

Connections {
target: Hypr

function onKbLayoutFullChanged() {
if (!Config.utilities.toasts.keyboardLayoutChanged)
return;

Toaster.toast(qsTr("Keyboard layout changed"), qsTr("New layout: %1").arg(Hypr.kbLayoutFull), "keyboard");
}
}

component Notif: QtObject {
id: notif

Expand Down