summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-01-08 17:00:30 -0500
committerFreya Murphy <freya@freyacat.org>2026-01-08 17:00:30 -0500
commit1e258986aedae45f6046731840a38613997861a8 (patch)
tree97bc34be43c96ddf3251ad98f0bab7ec664dab28
parentremove pfp (diff)
downloadcaelestia-shell-1e258986aedae45f6046731840a38613997861a8.tar.gz
caelestia-shell-1e258986aedae45f6046731840a38613997861a8.tar.bz2
caelestia-shell-1e258986aedae45f6046731840a38613997861a8.zip
hardcode single wallpaper
-rw-r--r--config/Config.qml3
-rw-r--r--config/LauncherConfig.qml1
-rw-r--r--config/UserPaths.qml2
-rw-r--r--modules/controlcenter/appearance/AppearancePane.qml57
-rw-r--r--modules/controlcenter/components/WallpaperGrid.qml241
-rw-r--r--modules/controlcenter/launcher/Settings.qml33
-rw-r--r--services/Wallpapers.qml50
-rw-r--r--utils/Paths.qml2
8 files changed, 6 insertions, 383 deletions
diff --git a/config/Config.qml b/config/Config.qml
index 40ca036..cc268e9 100644
--- a/config/Config.qml
+++ b/config/Config.qml
@@ -263,7 +263,6 @@ Singleton {
enabled: launcher.enabled,
showOnHover: launcher.showOnHover,
maxShown: launcher.maxShown,
- maxWallpapers: launcher.maxWallpapers,
specialPrefix: launcher.specialPrefix,
actionPrefix: launcher.actionPrefix,
enableDangerousActions: launcher.enableDangerousActions,
@@ -408,7 +407,7 @@ Singleton {
function serializePaths(): var {
return {
- wallpaperDir: paths.wallpaperDir,
+ wallpaper: paths.wallpaper,
sessionGif: paths.sessionGif,
mediaGif: paths.mediaGif
};
diff --git a/config/LauncherConfig.qml b/config/LauncherConfig.qml
index ea55838..896882f 100644
--- a/config/LauncherConfig.qml
+++ b/config/LauncherConfig.qml
@@ -4,7 +4,6 @@ JsonObject {
property bool enabled: true
property bool showOnHover: false
property int maxShown: 7
- property int maxWallpapers: 9 // Warning: even numbers look bad
property string specialPrefix: "@"
property int dragThreshold: 50
property bool vimKeybinds: false
diff --git a/config/UserPaths.qml b/config/UserPaths.qml
index f8de267..6deef01 100644
--- a/config/UserPaths.qml
+++ b/config/UserPaths.qml
@@ -2,7 +2,7 @@ import qs.utils
import Quickshell.Io
JsonObject {
- property string wallpaperDir: `${Paths.pictures}/Wallpapers`
+ property string wallpaper: `${Paths.config}/wallpaper.png`
property string sessionGif: "root:/assets/kurukuru.gif"
property string mediaGif: "root:/assets/bongocat.gif"
}
diff --git a/modules/controlcenter/appearance/AppearancePane.qml b/modules/controlcenter/appearance/AppearancePane.qml
index b6acbe5..37ae4a8 100644
--- a/modules/controlcenter/appearance/AppearancePane.qml
+++ b/modules/controlcenter/appearance/AppearancePane.qml
@@ -76,57 +76,6 @@ Item {
Config.save();
}
- Component {
- id: appearanceRightContentComponent
-
- Item {
- id: rightAppearanceFlickable
-
- ColumnLayout {
- id: contentLayout
-
- anchors.fill: parent
- spacing: 0
-
- StyledText {
- Layout.alignment: Qt.AlignHCenter
- Layout.bottomMargin: Appearance.spacing.normal
- text: qsTr("Wallpaper")
- font.pointSize: Appearance.font.size.extraLarge
- font.weight: 600
- }
-
- Loader {
- id: wallpaperLoader
-
- Layout.fillWidth: true
- Layout.fillHeight: true
- Layout.bottomMargin: -Appearance.padding.large * 2
-
- asynchronous: true
- active: {
- const isActive = root.session.activeIndex === 3;
- const isAdjacent = Math.abs(root.session.activeIndex - 3) === 1;
- const splitLayout = root.children[0];
- const loader = splitLayout && splitLayout.rightLoader ? splitLayout.rightLoader : null;
- const shouldActivate = loader && loader.item !== null && (isActive || isAdjacent);
- return shouldActivate;
- }
-
- onStatusChanged: {
- if (status === Loader.Error) {
- console.error("[AppearancePane] Wallpaper loader error!");
- }
- }
-
- sourceComponent: WallpaperGrid {
- session: root.session
- }
- }
- }
- }
- }
-
SplitPaneLayout {
anchors.fill: parent
@@ -148,10 +97,10 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
spacing: Appearance.spacing.small
-
+
readonly property var rootPane: sidebarFlickable.rootPane
- readonly property bool allSectionsExpanded:
+ readonly property bool allSectionsExpanded:
themeModeSection.expanded &&
colorVariantSection.expanded &&
colorSchemeSection.expanded &&
@@ -238,7 +187,5 @@ Item {
}
}
}
-
- rightContent: appearanceRightContentComponent
}
}
diff --git a/modules/controlcenter/components/WallpaperGrid.qml b/modules/controlcenter/components/WallpaperGrid.qml
deleted file mode 100644
index 5eab5b8..0000000
--- a/modules/controlcenter/components/WallpaperGrid.qml
+++ /dev/null
@@ -1,241 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import ".."
-import qs.components
-import qs.components.controls
-import qs.components.effects
-import qs.components.images
-import qs.services
-import qs.config
-import Caelestia.Models
-import QtQuick
-
-GridView {
- id: root
-
- required property Session session
-
- readonly property int minCellWidth: 200 + Appearance.spacing.normal
- readonly property int columnsCount: Math.max(1, Math.floor(width / minCellWidth))
-
- cellWidth: width / columnsCount
- cellHeight: 140 + Appearance.spacing.normal
-
- model: Wallpapers.list
-
- clip: true
-
- StyledScrollBar.vertical: StyledScrollBar {
- flickable: root
- }
-
- delegate: Item {
- required property var modelData
- required property int index
-
- width: root.cellWidth
- height: root.cellHeight
-
- readonly property bool isCurrent: modelData && modelData.path === Wallpapers.actualCurrent
- readonly property real itemMargin: Appearance.spacing.normal / 2
- readonly property real itemRadius: Appearance.rounding.normal
-
- StateLayer {
- anchors.fill: parent
- anchors.leftMargin: itemMargin
- anchors.rightMargin: itemMargin
- anchors.topMargin: itemMargin
- anchors.bottomMargin: itemMargin
- radius: itemRadius
-
- function onClicked(): void {
- Wallpapers.setWallpaper(modelData.path);
- }
- }
-
- StyledClippingRect {
- id: image
-
- anchors.fill: parent
- anchors.leftMargin: itemMargin
- anchors.rightMargin: itemMargin
- anchors.topMargin: itemMargin
- anchors.bottomMargin: itemMargin
- color: Colours.tPalette.m3surfaceContainer
- radius: itemRadius
- antialiasing: true
- layer.enabled: true
- layer.smooth: true
-
- CachingImage {
- id: cachingImage
-
- path: modelData.path
- anchors.fill: parent
- fillMode: Image.PreserveAspectCrop
- cache: true
- visible: opacity > 0
- antialiasing: true
- smooth: true
- sourceSize: Qt.size(width, height)
-
- opacity: status === Image.Ready ? 1 : 0
-
- Behavior on opacity {
- NumberAnimation {
- duration: 1000
- easing.type: Easing.OutQuad
- }
- }
- }
-
- // Fallback if CachingImage fails to load
- Image {
- id: fallbackImage
-
- anchors.fill: parent
- source: fallbackTimer.triggered && cachingImage.status !== Image.Ready ? modelData.path : ""
- asynchronous: true
- fillMode: Image.PreserveAspectCrop
- cache: true
- visible: opacity > 0
- antialiasing: true
- smooth: true
- sourceSize: Qt.size(width, height)
-
- opacity: status === Image.Ready && cachingImage.status !== Image.Ready ? 1 : 0
-
- Behavior on opacity {
- NumberAnimation {
- duration: 1000
- easing.type: Easing.OutQuad
- }
- }
- }
-
- Timer {
- id: fallbackTimer
-
- property bool triggered: false
- interval: 800
- running: cachingImage.status === Image.Loading || cachingImage.status === Image.Null
- onTriggered: triggered = true
- }
-
- // Gradient overlay for filename
- Rectangle {
- id: filenameOverlay
-
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
-
- implicitHeight: filenameText.implicitHeight + Appearance.padding.normal * 1.5
- radius: 0
-
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: Qt.rgba(Colours.palette.m3surface.r,
- Colours.palette.m3surface.g,
- Colours.palette.m3surface.b, 0)
- }
- GradientStop {
- position: 0.3
- color: Qt.rgba(Colours.palette.m3surface.r,
- Colours.palette.m3surface.g,
- Colours.palette.m3surface.b, 0.7)
- }
- GradientStop {
- position: 0.6
- color: Qt.rgba(Colours.palette.m3surface.r,
- Colours.palette.m3surface.g,
- Colours.palette.m3surface.b, 0.9)
- }
- GradientStop {
- position: 1.0
- color: Qt.rgba(Colours.palette.m3surface.r,
- Colours.palette.m3surface.g,
- Colours.palette.m3surface.b, 0.95)
- }
- }
-
- opacity: 0
-
- Behavior on opacity {
- NumberAnimation {
- duration: 1000
- easing.type: Easing.OutCubic
- }
- }
-
- Component.onCompleted: {
- opacity = 1;
- }
- }
- }
-
- Rectangle {
- anchors.fill: parent
- anchors.leftMargin: itemMargin
- anchors.rightMargin: itemMargin
- anchors.topMargin: itemMargin
- anchors.bottomMargin: itemMargin
- color: "transparent"
- radius: itemRadius + border.width
- border.width: isCurrent ? 2 : 0
- border.color: Colours.palette.m3primary
- antialiasing: true
- smooth: true
-
- Behavior on border.width {
- NumberAnimation {
- duration: 150
- easing.type: Easing.OutQuad
- }
- }
-
- MaterialIcon {
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.margins: Appearance.padding.small
-
- visible: isCurrent
- text: "check_circle"
- color: Colours.palette.m3primary
- font.pointSize: Appearance.font.size.large
- }
- }
-
- StyledText {
- id: filenameText
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- anchors.leftMargin: Appearance.padding.normal + Appearance.spacing.normal / 2
- anchors.rightMargin: Appearance.padding.normal + Appearance.spacing.normal / 2
- anchors.bottomMargin: Appearance.padding.normal
-
- text: modelData.name
- font.pointSize: Appearance.font.size.smaller
- font.weight: 500
- color: isCurrent ? Colours.palette.m3primary : Colours.palette.m3onSurface
- elide: Text.ElideMiddle
- maximumLineCount: 1
- horizontalAlignment: Text.AlignHCenter
-
- opacity: 0
-
- Behavior on opacity {
- NumberAnimation {
- duration: 1000
- easing.type: Easing.OutCubic
- }
- }
-
- Component.onCompleted: {
- opacity = 1;
- }
- }
- }
- }
diff --git a/modules/controlcenter/launcher/Settings.qml b/modules/controlcenter/launcher/Settings.qml
index 0b842e9..7ab1d46 100644
--- a/modules/controlcenter/launcher/Settings.qml
+++ b/modules/controlcenter/launcher/Settings.qml
@@ -73,12 +73,6 @@ ColumnLayout {
PropertyRow {
showTopMargin: true
- label: qsTr("Max wallpapers")
- value: qsTr("%1").arg(Config.launcher.maxWallpapers)
- }
-
- PropertyRow {
- showTopMargin: true
label: qsTr("Drag threshold")
value: qsTr("%1 px").arg(Config.launcher.dragThreshold)
}
@@ -120,33 +114,6 @@ ColumnLayout {
Config.save();
}
}
-
- ToggleRow {
- label: qsTr("Schemes")
- checked: Config.launcher.useFuzzy.schemes
- toggle.onToggled: {
- Config.launcher.useFuzzy.schemes = checked;
- Config.save();
- }
- }
-
- ToggleRow {
- label: qsTr("Variants")
- checked: Config.launcher.useFuzzy.variants
- toggle.onToggled: {
- Config.launcher.useFuzzy.variants = checked;
- Config.save();
- }
- }
-
- ToggleRow {
- label: qsTr("Wallpapers")
- checked: Config.launcher.useFuzzy.wallpapers
- toggle.onToggled: {
- Config.launcher.useFuzzy.wallpapers = checked;
- Config.save();
- }
- }
}
SectionHeader {
diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml
index cb96bc5..443b416 100644
--- a/services/Wallpapers.qml
+++ b/services/Wallpapers.qml
@@ -10,34 +10,16 @@ import QtQuick
Searcher {
id: root
- readonly property string currentNamePath: `${Paths.state}/wallpaper/path.txt`
readonly property list<string> smartArg: Config.services.smartScheme ? [] : ["--no-smart"]
property bool showPreview: false
- readonly property string current: showPreview ? previewPath : actualCurrent
- property string previewPath
- property string actualCurrent
- property bool previewColourLock
+ readonly property string current: Paths.wallpaper
function setWallpaper(path: string): void {
actualCurrent = path;
Quickshell.execDetached(["caelestia", "wallpaper", "-f", path, ...smartArg]);
}
- function preview(path: string): void {
- previewPath = path;
- showPreview = true;
-
- if (Colours.scheme === "dynamic")
- getPreviewColoursProc.running = true;
- }
-
- function stopPreview(): void {
- showPreview = false;
- if (!previewColourLock)
- Colours.showPreview = false;
- }
-
list: wallpapers.entries
key: "relativePath"
useFuzzy: Config.launcher.useFuzzy.wallpapers
@@ -60,34 +42,4 @@ Searcher {
return root.list.map(w => w.path).join("\n");
}
}
-
- FileView {
- path: root.currentNamePath
- watchChanges: true
- onFileChanged: reload()
- onLoaded: {
- root.actualCurrent = text().trim();
- root.previewColourLock = false;
- }
- }
-
- FileSystemModel {
- id: wallpapers
-
- recursive: true
- path: Paths.wallsdir
- filter: FileSystemModel.Images
- }
-
- Process {
- id: getPreviewColoursProc
-
- command: ["caelestia", "wallpaper", "-p", root.previewPath, ...root.smartArg]
- stdout: StdioCollector {
- onStreamFinished: {
- Colours.load(text, true);
- Colours.showPreview = true;
- }
- }
- }
}
diff --git a/utils/Paths.qml b/utils/Paths.qml
index 5c8cb68..c8f74d7 100644
--- a/utils/Paths.qml
+++ b/utils/Paths.qml
@@ -18,7 +18,7 @@ Singleton {
readonly property string imagecache: `${cache}/imagecache`
readonly property string notifimagecache: `${imagecache}/notifs`
- readonly property string wallsdir: Quickshell.env("CAELESTIA_WALLPAPERS_DIR") || absolutePath(Config.paths.wallpaperDir)
+ readonly property string wallpaper: Quickshell.env("CAELESTIA_WALLPAPER") || absolutePath(Config.paths.wallpaper)
readonly property string libdir: Quickshell.env("CAELESTIA_LIB_DIR") || "/usr/lib/caelestia"
function toLocalFile(path: url): string {