diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-01-08 16:13:14 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-01-08 16:13:14 -0500 |
| commit | 814d2f336c6a56e53412201bf99ca69753bda71b (patch) | |
| tree | dd793d6efe906b30ced51152f377f9907f1ab06f /modules/launcher/services | |
| parent | clean up lock screen (diff) | |
| download | caelestia-shell-814d2f336c6a56e53412201bf99ca69753bda71b.tar.gz caelestia-shell-814d2f336c6a56e53412201bf99ca69753bda71b.tar.bz2 caelestia-shell-814d2f336c6a56e53412201bf99ca69753bda71b.zip | |
remove themes and configs from launcher
Diffstat (limited to 'modules/launcher/services')
| -rw-r--r-- | modules/launcher/services/Actions.qml | 52 | ||||
| -rw-r--r-- | modules/launcher/services/M3Variants.qml | 85 | ||||
| -rw-r--r-- | modules/launcher/services/Schemes.qml | 88 |
3 files changed, 0 insertions, 225 deletions
diff --git a/modules/launcher/services/Actions.qml b/modules/launcher/services/Actions.qml deleted file mode 100644 index 5c1cb6b..0000000 --- a/modules/launcher/services/Actions.qml +++ /dev/null @@ -1,52 +0,0 @@ -pragma Singleton - -import ".." -import qs.services -import qs.config -import qs.utils -import Quickshell -import QtQuick - -Searcher { - id: root - - function transformSearch(search: string): string { - return search.slice(Config.launcher.actionPrefix.length); - } - - list: variants.instances - useFuzzy: Config.launcher.useFuzzy.actions - - Variants { - id: variants - - model: Config.launcher.actions.filter(a => (a.enabled ?? true) && (Config.launcher.enableDangerousActions || !(a.dangerous ?? false))) - - Action {} - } - - component Action: QtObject { - required property var modelData - readonly property string name: modelData.name ?? qsTr("Unnamed") - readonly property string desc: modelData.description ?? qsTr("No description") - readonly property string icon: modelData.icon ?? "help_outline" - readonly property list<string> command: modelData.command ?? [] - readonly property bool enabled: modelData.enabled ?? true - readonly property bool dangerous: modelData.dangerous ?? false - - function onClicked(list: AppList): void { - if (command.length === 0) - return; - - if (command[0] === "autocomplete" && command.length > 1) { - list.search.text = `${Config.launcher.actionPrefix}${command[1]} `; - } else if (command[0] === "setMode" && command.length > 1) { - list.visibilities.launcher = false; - Colours.setMode(command[1]); - } else { - list.visibilities.launcher = false; - Quickshell.execDetached(command); - } - } - } -} diff --git a/modules/launcher/services/M3Variants.qml b/modules/launcher/services/M3Variants.qml deleted file mode 100644 index 963a4d4..0000000 --- a/modules/launcher/services/M3Variants.qml +++ /dev/null @@ -1,85 +0,0 @@ -pragma Singleton - -import ".." -import qs.config -import qs.utils -import Quickshell -import QtQuick - -Searcher { - id: root - - function transformSearch(search: string): string { - return search.slice(`${Config.launcher.actionPrefix}variant `.length); - } - - list: [ - Variant { - variant: "vibrant" - icon: "sentiment_very_dissatisfied" - name: qsTr("Vibrant") - description: qsTr("A high chroma palette. The primary palette's chroma is at maximum.") - }, - Variant { - variant: "tonalspot" - icon: "android" - name: qsTr("Tonal Spot") - description: qsTr("Default for Material theme colours. A pastel palette with a low chroma.") - }, - Variant { - variant: "expressive" - icon: "compare_arrows" - name: qsTr("Expressive") - description: qsTr("A medium chroma palette. The primary palette's hue is different from the seed colour, for variety.") - }, - Variant { - variant: "fidelity" - icon: "compare" - name: qsTr("Fidelity") - description: qsTr("Matches the seed colour, even if the seed colour is very bright (high chroma).") - }, - Variant { - variant: "content" - icon: "sentiment_calm" - name: qsTr("Content") - description: qsTr("Almost identical to fidelity.") - }, - Variant { - variant: "fruitsalad" - icon: "nutrition" - name: qsTr("Fruit Salad") - description: qsTr("A playful theme - the seed colour's hue does not appear in the theme.") - }, - Variant { - variant: "rainbow" - icon: "looks" - name: qsTr("Rainbow") - description: qsTr("A playful theme - the seed colour's hue does not appear in the theme.") - }, - Variant { - variant: "neutral" - icon: "contrast" - name: qsTr("Neutral") - description: qsTr("Close to grayscale, a hint of chroma.") - }, - Variant { - variant: "monochrome" - icon: "filter_b_and_w" - name: qsTr("Monochrome") - description: qsTr("All colours are grayscale, no chroma.") - } - ] - useFuzzy: Config.launcher.useFuzzy.variants - - component Variant: QtObject { - required property string variant - required property string icon - required property string name - required property string description - - function onClicked(list: AppList): void { - list.visibilities.launcher = false; - Quickshell.execDetached(["caelestia", "scheme", "set", "-v", variant]); - } - } -} diff --git a/modules/launcher/services/Schemes.qml b/modules/launcher/services/Schemes.qml deleted file mode 100644 index dbb2dac..0000000 --- a/modules/launcher/services/Schemes.qml +++ /dev/null @@ -1,88 +0,0 @@ -pragma Singleton - -import ".." -import qs.config -import qs.utils -import Quickshell -import Quickshell.Io -import QtQuick - -Searcher { - id: root - - property string currentScheme - property string currentVariant - - function transformSearch(search: string): string { - return search.slice(`${Config.launcher.actionPrefix}scheme `.length); - } - - function selector(item: var): string { - return `${item.name} ${item.flavour}`; - } - - function reload(): void { - getCurrent.running = true; - } - - list: schemes.instances - useFuzzy: Config.launcher.useFuzzy.schemes - keys: ["name", "flavour"] - weights: [0.9, 0.1] - - Variants { - id: schemes - - Scheme {} - } - - Process { - id: getSchemes - - running: true - command: ["caelestia", "scheme", "list"] - stdout: StdioCollector { - onStreamFinished: { - const schemeData = JSON.parse(text); - const list = Object.entries(schemeData).map(([name, f]) => Object.entries(f).map(([flavour, colours]) => ({ - name, - flavour, - colours - }))); - - const flat = []; - for (const s of list) - for (const f of s) - flat.push(f); - - schemes.model = flat.sort((a, b) => (a.name + a.flavour).localeCompare((b.name + b.flavour))); - } - } - } - - Process { - id: getCurrent - - running: true - command: ["caelestia", "scheme", "get", "-nfv"] - stdout: StdioCollector { - onStreamFinished: { - const [name, flavour, variant] = text.trim().split("\n"); - root.currentScheme = `${name} ${flavour}`; - root.currentVariant = variant; - } - } - } - - component Scheme: QtObject { - required property var modelData - readonly property string name: modelData.name - readonly property string flavour: modelData.flavour - readonly property var colours: modelData.colours - - function onClicked(list: AppList): void { - list.visibilities.launcher = false; - Quickshell.execDetached(["caelestia", "scheme", "set", "-n", name, "-f", flavour]); - } - } -} |