summaryrefslogtreecommitdiff
path: root/modules/launcher/AppList.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-21 00:55:03 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-21 00:55:03 +1000
commit956e706f74468f29ea5fba5c122ea0a8e675c9de (patch)
tree680df32f6e61ebe2b57dd59812df6ab9435fb783 /modules/launcher/AppList.qml
parentlauncher: fix height when one item (diff)
downloadcaelestia-shell-956e706f74468f29ea5fba5c122ea0a8e675c9de.tar.gz
caelestia-shell-956e706f74468f29ea5fba5c122ea0a8e675c9de.tar.bz2
caelestia-shell-956e706f74468f29ea5fba5c122ea0a8e675c9de.zip
feat: launcher calculator
Requires libqalculate
Diffstat (limited to 'modules/launcher/AppList.qml')
-rw-r--r--modules/launcher/AppList.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/launcher/AppList.qml b/modules/launcher/AppList.qml
index c06893a..bbcb27f 100644
--- a/modules/launcher/AppList.qml
+++ b/modules/launcher/AppList.qml
@@ -14,11 +14,14 @@ ListView {
required property PersistentProperties visibilities
property bool isAction: search.text.startsWith(Config.launcher.actionPrefix)
+ property bool isCalc: search.text.startsWith(`${Config.launcher.actionPrefix}calc `)
property bool isScheme: search.text.startsWith(`${Config.launcher.actionPrefix}scheme `)
property bool isVariant: search.text.startsWith(`${Config.launcher.actionPrefix}variant `)
function getModelValues() {
let text = search.text;
+ if (isCalc)
+ return [0];
if (isScheme)
return Schemes.fuzzyQuery(text);
if (isVariant)
@@ -49,6 +52,8 @@ ListView {
}
delegate: {
+ if (isCalc)
+ return calcItem;
if (isScheme)
return schemeItem;
if (isVariant)
@@ -124,6 +129,14 @@ ListView {
}
Component {
+ id: calcItem
+
+ CalcItem {
+ list: root
+ }
+ }
+
+ Component {
id: schemeItem
SchemeItem {
@@ -143,6 +156,10 @@ ListView {
ChangeAnim {}
}
+ Behavior on isCalc {
+ ChangeAnim {}
+ }
+
Behavior on isScheme {
ChangeAnim {}
}