@@ -13,9 +13,15 @@ WlrLayershell {
1313
1414 keyboardFocus: WlrKeyboardFocus .Exclusive
1515
16- width: 560
17- height: 360
16+ width: 400
17+ height: 600
1818 color: " transparent"
19+
20+ anchors {
21+ top: true
22+ right: true
23+ bottom: true
24+ }
1925
2026 exclusionMode: ExclusionMode .None
2127
@@ -34,29 +40,23 @@ WlrLayershell {
3440 id: background
3541 anchors .fill : parent
3642 color: colors .surface
37- radius : 20
43+ // bottomRightRadius : 20
3844 clip: true
3945
4046 ColumnLayout {
4147 anchors .fill : parent
4248 anchors .margins : 10
4349 spacing: 8
4450
45- RowLayout {
46- IconImage {
47- Layout .leftMargin : 10
48- source: Quickshell .iconPath (" nix-snowflake" , true )
49- Layout .preferredWidth : 25
50- Layout .preferredHeight : 25
51- }
52-
5351 TextField {
54- id: input
5552 Layout .fillWidth : true
53+
54+ id: input
5655 placeholderText: " Run…"
5756 font .pixelSize : 18
58- color: " white"
5957 focus: true
58+ color: colors .on_surface
59+ placeholderTextColor: colors .on_surface
6060
6161 padding: 15
6262
@@ -67,7 +67,8 @@ WlrLayershell {
6767
6868 background: Rectangle {
6969 border .width : 0
70- color: " transparent"
70+ color: colors .surface_container
71+ radius: root .cornerRadius
7172 }
7273
7374 Keys .onEscapePressed : root .launcherVisible = false
@@ -90,76 +91,91 @@ WlrLayershell {
9091 }
9192 }
9293 }
93- }
94+
95+
9496
9597 // Filtered model: only items matching the query
96- ScriptModel {
97- id: filtered
98- values: {
99- const allEntries = [... DesktopEntries .applications .values ];
100- const q = launcher .query .trim ();
101-
102- if (q === " " ) {
103- return allEntries;
104- } else {
105- return allEntries .filter (d => d .name && d .name .toLowerCase ().includes (q));
98+ ScriptModel {
99+ id: filtered
100+ values: {
101+ const allEntries = [... DesktopEntries .applications .values ];
102+ const q = launcher .query .trim ();
103+
104+ if (q === " " ) {
105+ return allEntries;
106+ } else {
107+ return allEntries .filter (d => d .name && d .name .toLowerCase ().includes (q));
108+ }
106109 }
107110 }
108- }
109-
110- ListView {
111- id: list
112- Layout .fillWidth : true
113- Layout .fillHeight : true
114- clip: true
115- model: filtered .values
116- currentIndex: filtered .values .length > 0 ? 0 : - 1
117- keyNavigationWraps: true
118- preferredHighlightBegin: 0
119- preferredHighlightEnd: height
120- highlightRangeMode: ListView .ApplyRange
121- highlightMoveDuration: 80
122- highlight: Rectangle {
123- radius: 4
124- color: input .palette .highlight
125- }
126111
127- delegate: Item {
128- id: entry
129- required property var modelData
130- required property int index
131- width: ListView .view .width
132- height: 50
133-
134- MouseArea {
135- anchors .fill : parent
136- onClicked: list .currentIndex = entry .index
137- onDoubleClicked: launcher .launchSelected ()
112+ ListView {
113+ id: list
114+ Layout .fillWidth : true
115+ Layout .fillHeight : true
116+ clip: true
117+ model: filtered .values
118+ currentIndex: filtered .values .length > 0 ? 0 : - 1
119+ keyNavigationWraps: true
120+ preferredHighlightBegin: 0
121+ preferredHighlightEnd: height
122+ highlightRangeMode: ListView .ApplyRange
123+ highlightMoveDuration: 80
124+ highlight: Rectangle {
125+ radius: root .cornerRadius
126+ color: colors .primary_container
138127 }
139128
140- Row {
141- anchors .fill : parent
142- anchors .margins : 8
143- spacing: 10
144-
145- IconImage {
146- source: Quickshell .iconPath (modelData .icon , true )
147- width: 35
148- height: 35
129+ delegate: Item {
130+ id: entry
131+ required property var modelData
132+ required property int index
133+ width: ListView .view .width
134+ height: 50
135+
136+ MouseArea {
137+ anchors .fill : parent
138+ onClicked: list .currentIndex = entry .index
139+ onDoubleClicked: launcher .launchSelected ()
149140 }
150- Text {
151- id: label
152- color: " white"
153- text: modelData .name
154- font .pointSize : 20
155- elide: Text .ElideRight
156- verticalAlignment: Text .AlignVCenter
141+
142+ Row {
143+ anchors .fill : parent
144+ anchors .margins : 8
145+ spacing: 10
146+
147+ IconImage {
148+ source: Quickshell .iconPath (modelData .icon , true )
149+ width: 35
150+ height: 35
151+ }
152+
153+ Column {
154+ Text {
155+ id: labelName
156+ color: list .currentIndex === index ? colors .on_primary_container : colors .on_surface
157+ text: modelData .name
158+ font .pointSize : 15
159+ elide: Text .ElideRight
160+ verticalAlignment: Text .AlignVCenter
161+ }
162+
163+ Text {
164+ id: labelDesc
165+ color: list .currentIndex === index ? colors .on_primary_container : colors .outline
166+ text: modelData .comment || " No description provided."
167+ font .pointSize : 8
168+ elide: Text .ElideRight
169+ verticalAlignment: Text .AlignVCenter
170+ }
171+ }
172+
157173 }
158174 }
159- }
160175
161- // Enter also works while ListView has focus
162- Keys .onReturnPressed : launcher .launchSelected ()
163- }
164- } }
176+ // Enter also works while ListView has focus
177+ Keys .onReturnPressed : launcher .launchSelected ()
178+ }
179+ }
180+ }
165181}
0 commit comments