diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-21 00:55:03 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-21 00:55:03 +1000 |
| commit | 956e706f74468f29ea5fba5c122ea0a8e675c9de (patch) | |
| tree | 680df32f6e61ebe2b57dd59812df6ab9435fb783 /modules/launcher/AppList.qml | |
| parent | launcher: fix height when one item (diff) | |
| download | caelestia-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.qml | 17 |
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 {} } |