summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-03-16 10:25:53 -0400
committerFreya Murphy <freya@freyacat.org>2026-03-16 10:25:53 -0400
commit5a001251c981f25ad6d2521cc26c9feb0272c103 (patch)
tree9d90f0936fee78a00c9bb12c2a53d3009dcd5c02 /modules
parentfix weather round-ness (diff)
downloadcaelestia-shell-5a001251c981f25ad6d2521cc26c9feb0272c103.tar.gz
caelestia-shell-5a001251c981f25ad6d2521cc26c9feb0272c103.tar.bz2
caelestia-shell-5a001251c981f25ad6d2521cc26c9feb0272c103.zip
remove dashboard
Diffstat (limited to 'modules')
-rw-r--r--modules/dashboard/Content.qml14
-rw-r--r--modules/dashboard/Dash.qml43
-rw-r--r--modules/dashboard/Performance.qml4
-rw-r--r--modules/dashboard/dash/Calendar.qml253
-rw-r--r--modules/dashboard/dash/Media.qml254
5 files changed, 2 insertions, 566 deletions
diff --git a/modules/dashboard/Content.qml b/modules/dashboard/Content.qml
index bcda3d2..84ee0cf 100644
--- a/modules/dashboard/Content.qml
+++ b/modules/dashboard/Content.qml
@@ -16,12 +16,6 @@ Item {
readonly property var dashboardTabs: {
const allTabs = [
{
- component: dashComponent,
- iconName: "dashboard",
- text: qsTr("Dashboard"),
- enabled: Config.dashboard.showDashboard
- },
- {
component: mediaComponent,
iconName: "queue_music",
text: qsTr("Media"),
@@ -143,14 +137,6 @@ Item {
}
Component {
- id: dashComponent
- Dash {
- visibilities: root.visibilities
- state: root.state
- }
- }
-
- Component {
id: mediaComponent
Media {
visibilities: root.visibilities
diff --git a/modules/dashboard/Dash.qml b/modules/dashboard/Dash.qml
deleted file mode 100644
index df01166..0000000
--- a/modules/dashboard/Dash.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-import qs.components
-import qs.services
-import qs.config
-import "dash"
-import Quickshell
-import QtQuick.Layouts
-
-RowLayout {
- id: root
-
- required property PersistentProperties visibilities
- required property PersistentProperties state
-
- spacing: Appearance.spacing.normal
-
- Rect {
- Layout.preferredWidth: Config.dashboard.sizes.calandarWidth
- Layout.preferredHeight: Config.dashboard.sizes.dashboardHeight
-
- radius: Appearance.rounding.large
-
- Calendar {
- id: calendar
-
- state: root.state
- }
- }
-
- Rect {
- Layout.preferredWidth: media.implicitWidth
- Layout.preferredHeight: Config.dashboard.sizes.dashboardHeight
-
- radius: Appearance.rounding.large * 2
-
- Media {
- id: media
- }
- }
-
- component Rect: StyledRect {
- color: Colours.tPalette.m3surfaceContainer
- }
-}
diff --git a/modules/dashboard/Performance.qml b/modules/dashboard/Performance.qml
index 339c731..377f867 100644
--- a/modules/dashboard/Performance.qml
+++ b/modules/dashboard/Performance.qml
@@ -83,7 +83,7 @@ Item {
HeroCard {
Layout.fillWidth: true
Layout.minimumWidth: 400
- Layout.preferredHeight: 150
+ Layout.preferredHeight: 200
visible: Config.dashboard.performance.showCpu
icon: "memory"
title: SystemUsage.cpuName ? `CPU - ${SystemUsage.cpuName}` : qsTr("CPU")
@@ -99,7 +99,7 @@ Item {
HeroCard {
Layout.fillWidth: true
Layout.minimumWidth: 400
- Layout.preferredHeight: 150
+ Layout.preferredHeight: 200
visible: Config.dashboard.performance.showGpu && SystemUsage.gpuType !== "NONE"
icon: "desktop_windows"
title: SystemUsage.gpuName ? `GPU - ${SystemUsage.gpuName}` : qsTr("GPU")
diff --git a/modules/dashboard/dash/Calendar.qml b/modules/dashboard/dash/Calendar.qml
deleted file mode 100644
index 56c0493..0000000
--- a/modules/dashboard/dash/Calendar.qml
+++ /dev/null
@@ -1,253 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import qs.components
-import qs.components.effects
-import qs.components.controls
-import qs.services
-import qs.config
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-CustomMouseArea {
- id: root
-
- required property var state
-
- readonly property int currMonth: state.currentDate.getMonth()
- readonly property int currYear: state.currentDate.getFullYear()
-
- anchors.left: parent.left
- anchors.right: parent.right
- implicitHeight: inner.implicitHeight + inner.anchors.margins * 2
-
- acceptedButtons: Qt.MiddleButton
- onClicked: root.state.currentDate = new Date()
-
- function onWheel(event: WheelEvent): void {
- if (event.angleDelta.y > 0)
- root.state.currentDate = new Date(root.currYear, root.currMonth - 1, 1);
- else if (event.angleDelta.y < 0)
- root.state.currentDate = new Date(root.currYear, root.currMonth + 1, 1);
- }
-
- ColumnLayout {
- id: inner
-
- anchors.fill: parent
- anchors.margins: Appearance.padding.large
- spacing: Appearance.spacing.small
-
- RowLayout {
- id: monthNavigationRow
-
- Layout.fillWidth: true
- spacing: Appearance.spacing.small
-
- Item {
- implicitWidth: implicitHeight
- implicitHeight: prevMonthText.implicitHeight + Appearance.padding.small * 2
-
- StateLayer {
- id: prevMonthStateLayer
-
- radius: Appearance.rounding.full
-
- function onClicked(): void {
- root.state.currentDate = new Date(root.currYear, root.currMonth - 1, 1);
- }
- }
-
- MaterialIcon {
- id: prevMonthText
-
- anchors.centerIn: parent
- text: "chevron_left"
- color: Colours.palette.m3tertiary
- font.pointSize: Appearance.font.size.normal
- font.weight: 700
- }
- }
-
- Item {
- Layout.fillWidth: true
-
- implicitWidth: monthYearDisplay.implicitWidth + Appearance.padding.small * 2
- implicitHeight: monthYearDisplay.implicitHeight + Appearance.padding.small * 2
-
- StateLayer {
- anchors.fill: monthYearDisplay
- anchors.margins: -Appearance.padding.small
- anchors.leftMargin: -Appearance.padding.normal
- anchors.rightMargin: -Appearance.padding.normal
-
- radius: Appearance.rounding.full
- disabled: {
- const now = new Date();
- return root.currMonth === now.getMonth() && root.currYear === now.getFullYear();
- }
-
- function onClicked(): void {
- root.state.currentDate = new Date();
- }
- }
-
- StyledText {
- id: monthYearDisplay
-
- anchors.centerIn: parent
- text: grid.title
- color: Colours.palette.m3primary
- font.pointSize: Appearance.font.size.normal
- font.weight: 500
- font.capitalization: Font.Capitalize
- }
- }
-
- Item {
- implicitWidth: implicitHeight
- implicitHeight: nextMonthText.implicitHeight + Appearance.padding.small * 2
-
- StateLayer {
- id: nextMonthStateLayer
-
- radius: Appearance.rounding.full
-
- function onClicked(): void {
- root.state.currentDate = new Date(root.currYear, root.currMonth + 1, 1);
- }
- }
-
- MaterialIcon {
- id: nextMonthText
-
- anchors.centerIn: parent
- text: "chevron_right"
- color: Colours.palette.m3tertiary
- font.pointSize: Appearance.font.size.normal
- font.weight: 700
- }
- }
- }
-
- DayOfWeekRow {
- id: daysRow
-
- Layout.fillWidth: true
- locale: grid.locale
-
- delegate: StyledText {
- required property var model
-
- horizontalAlignment: Text.AlignHCenter
- text: model.shortName
- font.weight: 500
- color: (model.day === 0 || model.day === 6) ? Colours.palette.m3secondary : Colours.palette.m3onSurfaceVariant
- }
- }
-
- Item {
- Layout.fillWidth: true
- implicitHeight: grid.implicitHeight
-
- MonthGrid {
- id: grid
-
- month: root.currMonth
- year: root.currYear
-
- anchors.fill: parent
-
- spacing: 3
- locale: Qt.locale()
-
- delegate: Item {
- id: dayItem
-
- required property var model
-
- implicitWidth: implicitHeight
- implicitHeight: text.implicitHeight + Appearance.padding.small * 2
-
- StyledText {
- id: text
-
- anchors.centerIn: parent
-
- horizontalAlignment: Text.AlignHCenter
- text: grid.locale.toString(dayItem.model.day)
- color: {
- const dayOfWeek = dayItem.model.date.getUTCDay();
- if (dayOfWeek === 0 || dayOfWeek === 6)
- return Colours.palette.m3secondary;
-
- return Colours.palette.m3onSurfaceVariant;
- }
- opacity: dayItem.model.today || dayItem.model.month === grid.month ? 1 : 0.4
- font.pointSize: Appearance.font.size.normal
- font.weight: 500
- }
- }
- }
-
- StyledRect {
- id: todayIndicator
-
- readonly property Item todayItem: grid.contentItem.children.find(c => c.model.today) ?? null
- property Item today
-
- onTodayItemChanged: {
- if (todayItem)
- today = todayItem;
- }
-
- x: today ? today.x + (today.width - implicitWidth) / 2 : 0
- y: today?.y ?? 0
-
- implicitWidth: today?.implicitWidth ?? 0
- implicitHeight: today?.implicitHeight ?? 0
-
- clip: true
- radius: Appearance.rounding.full
- color: Colours.palette.m3primary
-
- opacity: todayItem ? 1 : 0
- scale: todayItem ? 1 : 0.7
-
- Colouriser {
- x: -todayIndicator.x
- y: -todayIndicator.y
-
- implicitWidth: grid.width
- implicitHeight: grid.height
-
- source: grid
- sourceColor: Colours.palette.m3onSurface
- colorizationColor: Colours.palette.m3onPrimary
- }
-
- Behavior on opacity {
- Anim {}
- }
-
- Behavior on scale {
- Anim {}
- }
-
- Behavior on x {
- Anim {
- duration: Appearance.anim.durations.expressiveDefaultSpatial
- easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
- }
- }
-
- Behavior on y {
- Anim {
- duration: Appearance.anim.durations.expressiveDefaultSpatial
- easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
- }
- }
- }
- }
- }
-}
diff --git a/modules/dashboard/dash/Media.qml b/modules/dashboard/dash/Media.qml
deleted file mode 100644
index d650669..0000000
--- a/modules/dashboard/dash/Media.qml
+++ /dev/null
@@ -1,254 +0,0 @@
-import qs.components
-import qs.services
-import qs.config
-import qs.utils
-import Caelestia.Services
-import QtQuick
-import QtQuick.Shapes
-
-Item {
- id: root
-
- property real playerProgress: {
- const active = Players.active;
- return active?.length ? active.position / active.length : 0;
- }
-
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- implicitWidth: Config.dashboard.sizes.mediaWidth
-
- Behavior on playerProgress {
- Anim {
- duration: Appearance.anim.durations.large
- }
- }
-
- Timer {
- running: Players.active?.isPlaying ?? false
- interval: Config.dashboard.mediaUpdateInterval
- triggeredOnStart: true
- repeat: true
- onTriggered: Players.active?.positionChanged()
- }
-
- ServiceRef {
- service: Audio.beatTracker
- }
-
- Shape {
- preferredRendererType: Shape.CurveRenderer
-
- ShapePath {
- fillColor: "transparent"
- strokeColor: Colours.layer(Colours.palette.m3surfaceContainerHigh, 2)
- strokeWidth: Config.dashboard.sizes.mediaProgressThickness
- capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
-
- PathAngleArc {
- centerX: cover.x + cover.width / 2
- centerY: cover.y + cover.height / 2
- radiusX: (cover.width + Config.dashboard.sizes.mediaProgressThickness) / 2 + Appearance.spacing.small
- radiusY: (cover.height + Config.dashboard.sizes.mediaProgressThickness) / 2 + Appearance.spacing.small
- startAngle: -90 - Config.dashboard.sizes.mediaProgressSweep / 2
- sweepAngle: Config.dashboard.sizes.mediaProgressSweep
- }
-
- Behavior on strokeColor {
- CAnim {}
- }
- }
-
- ShapePath {
- fillColor: "transparent"
- strokeColor: Colours.palette.m3primary
- strokeWidth: Config.dashboard.sizes.mediaProgressThickness
- capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
-
- PathAngleArc {
- centerX: cover.x + cover.width / 2
- centerY: cover.y + cover.height / 2
- radiusX: (cover.width + Config.dashboard.sizes.mediaProgressThickness) / 2 + Appearance.spacing.small
- radiusY: (cover.height + Config.dashboard.sizes.mediaProgressThickness) / 2 + Appearance.spacing.small
- startAngle: -90 - Config.dashboard.sizes.mediaProgressSweep / 2
- sweepAngle: Config.dashboard.sizes.mediaProgressSweep * root.playerProgress
- }
-
- Behavior on strokeColor {
- CAnim {}
- }
- }
- }
-
- StyledClippingRect {
- id: cover
-
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Appearance.padding.large + Config.dashboard.sizes.mediaProgressThickness + Appearance.spacing.small
-
- implicitHeight: width
- color: Colours.tPalette.m3surfaceContainerHigh
- radius: Infinity
-
- MaterialIcon {
- anchors.centerIn: parent
-
- grade: 200
- text: "art_track"
- color: Colours.palette.m3onSurfaceVariant
- font.pointSize: (parent.width * 0.4) || 1
- }
-
- Image {
- id: image
-
- anchors.fill: parent
-
- source: Players.active?.trackArtUrl ?? "" // qmllint disable incompatible-type
- asynchronous: true
- fillMode: Image.PreserveAspectCrop
- sourceSize.width: width
- sourceSize.height: height
- }
- }
-
- StyledText {
- id: title
-
- anchors.top: cover.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.topMargin: Appearance.spacing.normal
-
- animate: true
- horizontalAlignment: Text.AlignHCenter
- text: (Players.active?.trackTitle ?? qsTr("No media")) || qsTr("Unknown title")
- color: Colours.palette.m3primary
- font.pointSize: Appearance.font.size.normal
-
- width: parent.implicitWidth - Appearance.padding.large * 2
- elide: Text.ElideRight
- }
-
- StyledText {
- id: album
-
- anchors.top: title.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.topMargin: Appearance.spacing.small
-
- animate: true
- horizontalAlignment: Text.AlignHCenter
- text: (Players.active?.trackAlbum ?? qsTr("No media")) || qsTr("Unknown album")
- color: Colours.palette.m3outline
- font.pointSize: Appearance.font.size.small
-
- width: parent.implicitWidth - Appearance.padding.large * 2
- elide: Text.ElideRight
- }
-
- StyledText {
- id: artist
-
- anchors.top: album.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.topMargin: Appearance.spacing.small
-
- animate: true
- horizontalAlignment: Text.AlignHCenter
- text: (Players.active?.trackArtist ?? qsTr("No media")) || qsTr("Unknown artist")
- color: Colours.palette.m3secondary
-
- width: parent.implicitWidth - Appearance.padding.large * 2
- elide: Text.ElideRight
- }
-
- Row {
- id: controls
-
- anchors.top: artist.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.topMargin: Appearance.spacing.smaller
-
- spacing: Appearance.spacing.small
-
- Control {
- icon: "skip_previous"
- canUse: Players.active?.canGoPrevious ?? false
-
- function onClicked(): void {
- Players.active?.previous();
- }
- }
-
- Control {
- icon: Players.active?.isPlaying ? "pause" : "play_arrow"
- canUse: Players.active?.canTogglePlaying ?? false
-
- function onClicked(): void {
- Players.active?.togglePlaying();
- }
- }
-
- Control {
- icon: "skip_next"
- canUse: Players.active?.canGoNext ?? false
-
- function onClicked(): void {
- Players.active?.next();
- }
- }
- }
-
- AnimatedImage {
- id: bongocat
-
- anchors.top: controls.bottom
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.topMargin: Appearance.spacing.small
- anchors.bottomMargin: Appearance.padding.large
- anchors.margins: Appearance.padding.large * 2
-
- playing: Players.active?.isPlaying ?? false
- speed: Audio.beatTracker.bpm / Appearance.anim.mediaGifSpeedAdjustment
- source: Paths.absolutePath(Config.paths.mediaGif)
- asynchronous: true
- fillMode: AnimatedImage.PreserveAspectFit
- }
-
- component Control: StyledRect {
- id: control
-
- required property string icon
- required property bool canUse
- function onClicked(): void {
- }
-
- implicitWidth: Math.max(icon.implicitHeight, icon.implicitHeight) + Appearance.padding.small
- implicitHeight: implicitWidth
-
- StateLayer {
- disabled: !control.canUse
- radius: Appearance.rounding.full
-
- function onClicked(): void {
- control.onClicked();
- }
- }
-
- MaterialIcon {
- id: icon
-
- anchors.centerIn: parent
- anchors.verticalCenterOffset: font.pointSize * 0.05
-
- animate: true
- text: control.icon
- color: control.canUse ? Colours.palette.m3onSurface : Colours.palette.m3outline
- font.pointSize: Appearance.font.size.large
- }
- }
-}