summaryrefslogtreecommitdiff
path: root/modules/bar/popouts
diff options
context:
space:
mode:
authorAleksElixir <71710534+AleksElixir@users.noreply.github.com>2025-09-23 12:31:36 +0300
committerGitHub <noreply@github.com>2025-09-23 19:31:36 +1000
commit50ef4871c782ae88ec0b6d4f6468d1e4d5dd9c6b (patch)
tree370de99ba8e564d9dd1947742d972f7c0c3427b0 /modules/bar/popouts
parentconfig: enable/disable specific toasts (diff)
downloadcaelestia-shell-50ef4871c782ae88ec0b6d4f6468d1e4d5dd9c6b.tar.gz
caelestia-shell-50ef4871c782ae88ec0b6d4f6468d1e4d5dd9c6b.tar.bz2
caelestia-shell-50ef4871c782ae88ec0b6d4f6468d1e4d5dd9c6b.zip
popouts/kblayout: add switch layout button (#682)
* keyboard layout * Update KbLayout.qml Code cleanup * Update KbLayout.qml more code cleanup * fix --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Diffstat (limited to 'modules/bar/popouts')
-rw-r--r--modules/bar/popouts/KbLayout.qml26
1 files changed, 24 insertions, 2 deletions
diff --git a/modules/bar/popouts/KbLayout.qml b/modules/bar/popouts/KbLayout.qml
index 8e5ae8d..b12f2ef 100644
--- a/modules/bar/popouts/KbLayout.qml
+++ b/modules/bar/popouts/KbLayout.qml
@@ -1,6 +1,28 @@
import qs.components
+import qs.components.controls
import qs.services
+import qs.config
+import Quickshell
+import QtQuick.Layouts
-StyledText {
- text: qsTr("Keyboard layout: %1").arg(Hypr.kbLayoutFull)
+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"])
+ }
}