summaryrefslogtreecommitdiff
path: root/modules/launcher/Content.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/launcher/Content.qml')
-rw-r--r--modules/launcher/Content.qml68
1 files changed, 68 insertions, 0 deletions
diff --git a/modules/launcher/Content.qml b/modules/launcher/Content.qml
new file mode 100644
index 0000000..2f9fcdd
--- /dev/null
+++ b/modules/launcher/Content.qml
@@ -0,0 +1,68 @@
+import "root:/widgets"
+import "root:/config"
+import Quickshell
+import QtQuick
+
+Item {
+ implicitWidth: LauncherConfig.sizes.width
+ implicitHeight: search.height + list.height + Appearance.padding.large * 5 // Don't question it
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ StyledRect {
+ color: Appearance.alpha(Appearance.colours.m3surfaceContainerHigh, true)
+ radius: Appearance.rounding.large
+ implicitHeight: list.height + Appearance.padding.large * 2
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: search.top
+ anchors.bottomMargin: Appearance.spacing.normal
+ anchors.margins: Appearance.padding.large
+
+ ListView {
+ id: list
+
+ model: DesktopEntries.applications.values.filter(x => x.name.toLowerCase().includes(search.text.toLowerCase()))
+
+ orientation: Qt.Vertical
+ verticalLayoutDirection: Qt.BottomToTop
+ height: 100
+ width: 100
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.margins: Appearance.padding.large
+
+ delegate: PaddedRect {
+ id: entry
+
+ required property DesktopEntry modelData
+
+ width: LauncherConfig.sizes.width
+
+ StyledText {
+ text: modelData.name
+ font.family: Appearance.font.family.sans
+ font.pointSize: Appearance.font.size.smaller
+ }
+ }
+ }
+ }
+
+ StyledTextField {
+ id: search
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.margins: Appearance.padding.large
+
+ placeholderText: "Type \">\" for commands"
+
+ background: StyledRect {
+ color: Appearance.alpha(Appearance.colours.m3surfaceContainerHigh, true)
+ radius: Appearance.rounding.large
+ }
+ }
+}