summaryrefslogtreecommitdiff
path: root/modules/launcher/items
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-01-08 16:13:14 -0500
committerFreya Murphy <freya@freyacat.org>2026-01-08 16:13:14 -0500
commit814d2f336c6a56e53412201bf99ca69753bda71b (patch)
treedd793d6efe906b30ced51152f377f9907f1ab06f /modules/launcher/items
parentclean up lock screen (diff)
downloadcaelestia-shell-814d2f336c6a56e53412201bf99ca69753bda71b.tar.gz
caelestia-shell-814d2f336c6a56e53412201bf99ca69753bda71b.tar.bz2
caelestia-shell-814d2f336c6a56e53412201bf99ca69753bda71b.zip
remove themes and configs from launcher
Diffstat (limited to 'modules/launcher/items')
-rw-r--r--modules/launcher/items/ActionItem.qml70
-rw-r--r--modules/launcher/items/CalcItem.qml123
-rw-r--r--modules/launcher/items/SchemeItem.qml105
-rw-r--r--modules/launcher/items/VariantItem.qml81
-rw-r--r--modules/launcher/items/WallpaperItem.qml98
5 files changed, 0 insertions, 477 deletions
diff --git a/modules/launcher/items/ActionItem.qml b/modules/launcher/items/ActionItem.qml
deleted file mode 100644
index e158029..0000000
--- a/modules/launcher/items/ActionItem.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-import "../services"
-import qs.components
-import qs.services
-import qs.config
-import QtQuick
-
-Item {
- id: root
-
- required property var modelData
- required property var list
-
- implicitHeight: Config.launcher.sizes.itemHeight
-
- anchors.left: parent?.left
- anchors.right: parent?.right
-
- StateLayer {
- radius: Appearance.rounding.normal
-
- function onClicked(): void {
- root.modelData?.onClicked(root.list);
- }
- }
-
- Item {
- anchors.fill: parent
- anchors.leftMargin: Appearance.padding.larger
- anchors.rightMargin: Appearance.padding.larger
- anchors.margins: Appearance.padding.smaller
-
- MaterialIcon {
- id: icon
-
- text: root.modelData?.icon ?? ""
- font.pointSize: Appearance.font.size.extraLarge
-
- anchors.verticalCenter: parent.verticalCenter
- }
-
- Item {
- anchors.left: icon.right
- anchors.leftMargin: Appearance.spacing.normal
- anchors.verticalCenter: icon.verticalCenter
-
- implicitWidth: parent.width - icon.width
- implicitHeight: name.implicitHeight + desc.implicitHeight
-
- StyledText {
- id: name
-
- text: root.modelData?.name ?? ""
- font.pointSize: Appearance.font.size.normal
- }
-
- StyledText {
- id: desc
-
- text: root.modelData?.desc ?? ""
- font.pointSize: Appearance.font.size.small
- color: Colours.palette.m3outline
-
- elide: Text.ElideRight
- width: root.width - icon.width - Appearance.rounding.normal * 2
-
- anchors.top: name.bottom
- }
- }
- }
-}
diff --git a/modules/launcher/items/CalcItem.qml b/modules/launcher/items/CalcItem.qml
deleted file mode 100644
index 65489d9..0000000
--- a/modules/launcher/items/CalcItem.qml
+++ /dev/null
@@ -1,123 +0,0 @@
-import qs.components
-import qs.services
-import qs.config
-import Caelestia
-import Quickshell
-import QtQuick
-import QtQuick.Layouts
-
-Item {
- id: root
-
- required property var list
- readonly property string math: list.search.text.slice(`${Config.launcher.actionPrefix}calc `.length)
-
- function onClicked(): void {
- Quickshell.execDetached(["wl-copy", Qalculator.eval(math, false)]);
- root.list.visibilities.launcher = false;
- }
-
- implicitHeight: Config.launcher.sizes.itemHeight
-
- anchors.left: parent?.left
- anchors.right: parent?.right
-
- StateLayer {
- radius: Appearance.rounding.normal
-
- function onClicked(): void {
- root.onClicked();
- }
- }
-
- RowLayout {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- anchors.margins: Appearance.padding.larger
-
- spacing: Appearance.spacing.normal
-
- MaterialIcon {
- text: "function"
- font.pointSize: Appearance.font.size.extraLarge
- Layout.alignment: Qt.AlignVCenter
- }
-
- StyledText {
- id: result
-
- color: {
- if (text.includes("error: ") || text.includes("warning: "))
- return Colours.palette.m3error;
- if (!root.math)
- return Colours.palette.m3onSurfaceVariant;
- return Colours.palette.m3onSurface;
- }
-
- text: root.math.length > 0 ? Qalculator.eval(root.math) : qsTr("Type an expression to calculate")
- elide: Text.ElideLeft
-
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignVCenter
- }
-
- StyledRect {
- color: Colours.palette.m3tertiary
- radius: Appearance.rounding.normal
- clip: true
-
- implicitWidth: (stateLayer.containsMouse ? label.implicitWidth + label.anchors.rightMargin : 0) + icon.implicitWidth + Appearance.padding.normal * 2
- implicitHeight: Math.max(label.implicitHeight, icon.implicitHeight) + Appearance.padding.small * 2
-
- Layout.alignment: Qt.AlignVCenter
-
- StateLayer {
- id: stateLayer
-
- color: Colours.palette.m3onTertiary
-
- function onClicked(): void {
- Quickshell.execDetached(["app2unit", "--", ...Config.general.apps.terminal, "fish", "-C", `exec qalc -i '${root.math}'`]);
- root.list.visibilities.launcher = false;
- }
- }
-
- StyledText {
- id: label
-
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: icon.left
- anchors.rightMargin: Appearance.spacing.small
-
- text: qsTr("Open in calculator")
- color: Colours.palette.m3onTertiary
- font.pointSize: Appearance.font.size.normal
-
- opacity: stateLayer.containsMouse ? 1 : 0
-
- Behavior on opacity {
- Anim {}
- }
- }
-
- MaterialIcon {
- id: icon
-
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
- anchors.rightMargin: Appearance.padding.normal
-
- text: "open_in_new"
- color: Colours.palette.m3onTertiary
- font.pointSize: Appearance.font.size.large
- }
-
- Behavior on implicitWidth {
- Anim {
- easing.bezierCurve: Appearance.anim.curves.emphasized
- }
- }
- }
- }
-}
diff --git a/modules/launcher/items/SchemeItem.qml b/modules/launcher/items/SchemeItem.qml
deleted file mode 100644
index b755c37..0000000
--- a/modules/launcher/items/SchemeItem.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-import "../services"
-import qs.components
-import qs.services
-import qs.config
-import QtQuick
-
-Item {
- id: root
-
- required property Schemes.Scheme modelData
- required property var list
-
- implicitHeight: Config.launcher.sizes.itemHeight
-
- anchors.left: parent?.left
- anchors.right: parent?.right
-
- StateLayer {
- radius: Appearance.rounding.normal
-
- function onClicked(): void {
- root.modelData?.onClicked(root.list);
- }
- }
-
- Item {
- anchors.fill: parent
- anchors.leftMargin: Appearance.padding.larger
- anchors.rightMargin: Appearance.padding.larger
- anchors.margins: Appearance.padding.smaller
-
- StyledRect {
- id: preview
-
- anchors.verticalCenter: parent.verticalCenter
-
- border.width: 1
- border.color: Qt.alpha(`#${root.modelData?.colours?.outline}`, 0.5)
-
- color: `#${root.modelData?.colours?.surface}`
- radius: Appearance.rounding.full
- implicitWidth: parent.height * 0.8
- implicitHeight: parent.height * 0.8
-
- Item {
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.right: parent.right
-
- implicitWidth: parent.implicitWidth / 2
- clip: true
-
- StyledRect {
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.right: parent.right
-
- implicitWidth: preview.implicitWidth
- color: `#${root.modelData?.colours?.primary}`
- radius: Appearance.rounding.full
- }
- }
- }
-
- Column {
- anchors.left: preview.right
- anchors.leftMargin: Appearance.spacing.normal
- anchors.verticalCenter: parent.verticalCenter
-
- width: parent.width - preview.width - anchors.leftMargin - (current.active ? current.width + Appearance.spacing.normal : 0)
- spacing: 0
-
- StyledText {
- text: root.modelData?.flavour ?? ""
- font.pointSize: Appearance.font.size.normal
- }
-
- StyledText {
- text: root.modelData?.name ?? ""
- font.pointSize: Appearance.font.size.small
- color: Colours.palette.m3outline
-
- elide: Text.ElideRight
- anchors.left: parent.left
- anchors.right: parent.right
- }
- }
-
- Loader {
- id: current
-
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
-
- active: `${root.modelData?.name} ${root.modelData?.flavour}` === Schemes.currentScheme
- asynchronous: true
-
- sourceComponent: MaterialIcon {
- text: "check"
- color: Colours.palette.m3onSurfaceVariant
- font.pointSize: Appearance.font.size.large
- }
- }
- }
-}
diff --git a/modules/launcher/items/VariantItem.qml b/modules/launcher/items/VariantItem.qml
deleted file mode 100644
index a161aa8..0000000
--- a/modules/launcher/items/VariantItem.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-import "../services"
-import qs.components
-import qs.services
-import qs.config
-import QtQuick
-
-Item {
- id: root
-
- required property M3Variants.Variant modelData
- required property var list
-
- implicitHeight: Config.launcher.sizes.itemHeight
-
- anchors.left: parent?.left
- anchors.right: parent?.right
-
- StateLayer {
- radius: Appearance.rounding.normal
-
- function onClicked(): void {
- root.modelData?.onClicked(root.list);
- }
- }
-
- Item {
- anchors.fill: parent
- anchors.leftMargin: Appearance.padding.larger
- anchors.rightMargin: Appearance.padding.larger
- anchors.margins: Appearance.padding.smaller
-
- MaterialIcon {
- id: icon
-
- text: root.modelData?.icon ?? ""
- font.pointSize: Appearance.font.size.extraLarge
-
- anchors.verticalCenter: parent.verticalCenter
- }
-
- Column {
- anchors.left: icon.right
- anchors.leftMargin: Appearance.spacing.larger
- anchors.verticalCenter: icon.verticalCenter
-
- width: parent.width - icon.width - anchors.leftMargin - (current.active ? current.width + Appearance.spacing.normal : 0)
- spacing: 0
-
- StyledText {
- text: root.modelData?.name ?? ""
- font.pointSize: Appearance.font.size.normal
- }
-
- StyledText {
- text: root.modelData?.description ?? ""
- font.pointSize: Appearance.font.size.small
- color: Colours.palette.m3outline
-
- elide: Text.ElideRight
- anchors.left: parent.left
- anchors.right: parent.right
- }
- }
-
- Loader {
- id: current
-
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
-
- active: root.modelData?.variant === Schemes.currentVariant
- asynchronous: true
-
- sourceComponent: MaterialIcon {
- text: "check"
- color: Colours.palette.m3onSurfaceVariant
- font.pointSize: Appearance.font.size.large
- }
- }
- }
-}
diff --git a/modules/launcher/items/WallpaperItem.qml b/modules/launcher/items/WallpaperItem.qml
deleted file mode 100644
index 9fdac3f..0000000
--- a/modules/launcher/items/WallpaperItem.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-import qs.components
-import qs.components.effects
-import qs.components.images
-import qs.services
-import qs.config
-import Caelestia.Models
-import Quickshell
-import QtQuick
-
-Item {
- id: root
-
- required property FileSystemEntry modelData
- required property PersistentProperties visibilities
-
- scale: 0.5
- opacity: 0
- z: PathView.z ?? 0
-
- Component.onCompleted: {
- scale = Qt.binding(() => PathView.isCurrentItem ? 1 : PathView.onPath ? 0.8 : 0);
- opacity = Qt.binding(() => PathView.onPath ? 1 : 0);
- }
-
- implicitWidth: image.width + Appearance.padding.larger * 2
- implicitHeight: image.height + label.height + Appearance.spacing.small / 2 + Appearance.padding.large + Appearance.padding.normal
-
- StateLayer {
- radius: Appearance.rounding.normal
-
- function onClicked(): void {
- Wallpapers.setWallpaper(root.modelData.path);
- root.visibilities.launcher = false;
- }
- }
-
- Elevation {
- anchors.fill: image
- radius: image.radius
- opacity: root.PathView.isCurrentItem ? 1 : 0
- level: 4
-
- Behavior on opacity {
- Anim {}
- }
- }
-
- StyledClippingRect {
- id: image
-
- anchors.horizontalCenter: parent.horizontalCenter
- y: Appearance.padding.large
- color: Colours.tPalette.m3surfaceContainer
- radius: Appearance.rounding.normal
-
- implicitWidth: Config.launcher.sizes.wallpaperWidth
- implicitHeight: implicitWidth / 16 * 9
-
- MaterialIcon {
- anchors.centerIn: parent
- text: "image"
- color: Colours.tPalette.m3outline
- font.pointSize: Appearance.font.size.extraLarge * 2
- font.weight: 600
- }
-
- CachingImage {
- path: root.modelData.path
- smooth: !root.PathView.view.moving
- cache: true
-
- anchors.fill: parent
- }
- }
-
- StyledText {
- id: label
-
- anchors.top: image.bottom
- anchors.topMargin: Appearance.spacing.small / 2
- anchors.horizontalCenter: parent.horizontalCenter
-
- width: image.width - Appearance.padding.normal * 2
- horizontalAlignment: Text.AlignHCenter
- elide: Text.ElideRight
- renderType: Text.QtRendering
- text: root.modelData.relativePath
- font.pointSize: Appearance.font.size.normal
- }
-
- Behavior on scale {
- Anim {}
- }
-
- Behavior on opacity {
- Anim {}
- }
-}