add screenpadding and fix file operations of settings

This commit is contained in:
lucy 2025-12-31 01:37:27 +01:00
parent f1948f9889
commit 232ada5fae
5 changed files with 52 additions and 19 deletions

29
Colors.qml Normal file
View File

@ -0,0 +1,29 @@
pragma Singleton
import QtQuick
import Quickshell
Singleton {
id: customColors
// Core Backgrounds
readonly property color background: "#1A1B26"
readonly property color foreground: "#C0CAF5"
readonly property color cursor: "#C0CAF5"
// The 16 Colors of the Apocalypse
readonly property color color0: "#414868"
readonly property color color1: "#F7768E"
readonly property color color2: "#9ECE6A"
readonly property color color3: "#E0AF68"
readonly property color color4: "#7AA2F7"
readonly property color color5: "#BB9AF7"
readonly property color color6: "#7DCFFF"
readonly property color color7: "#A9B1D6"
readonly property color color8: "#414868"
readonly property color color9: "#F7768E"
readonly property color color10: "#9ECE6A"
readonly property color color11: "#E0AF68"
readonly property color color12: "#7AA2F7"
readonly property color color13: "#BB9AF7"
readonly property color color14: "#7DCFFF"
readonly property color color15: "#C0CAF5"
}

View File

@ -36,6 +36,7 @@ PanelWindow {
spacing: 30 spacing: 30
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Battery {}
Volume {} Volume {}
PowerProfiles {} PowerProfiles {}
SystemTray { SystemTray {

View File

@ -11,6 +11,7 @@ import "../settings/"
WlrLayershell { WlrLayershell {
id: root id: root
required property var modelData
screen: { screen: {
// Iterate through all connected Quickshell screens // Iterate through all connected Quickshell screens
for (let i = 0; i < Quickshell.screens.length; i++) { for (let i = 0; i < Quickshell.screens.length; i++) {

View File

@ -4,26 +4,27 @@ import QtQuick
import Quickshell import Quickshell
import Quickshell.Io import Quickshell.Io
Singleton {
FileView { FileView {
id: settingsView
path: "/home/lucy/.cache/quickshell_settings.json" path: "/home/lucy/.cache/quickshell_settings.json"
watchChanges: true watchChanges: true
onAdapterChanged: writeAdapter() onAdapterChanged: writeAdapter()
onFileChanged: reload()
JsonAdapter { adapter: JsonAdapter {
id: adapter id: jsonAdapter
property string lastWallpaper property string currentWall: ""
property string wallDir property string wallDir: "/home/lucy/.walls/"
property string font property string font: "SFMono Nerd Font Propo"
property real fontSize: 14 property real fontSize: 14
}
}
property alias currentWall: adapter.lastWallpaper onCurrentWallChanged: settingsView.writeAdapter()
property alias font: adapter.font onWallDirChanged: settingsView.writeAdapter()
property alias fontSize: adapter.fontSize onFontChanged: settingsView.writeAdapter()
property alias wallDir: adapter.wallDir onFontSizeChanged: settingsView.writeAdapter()
}
property alias currentWall: jsonAdapter.currentWall
property alias font: jsonAdapter.font
property alias fontSize: jsonAdapter.fontSize
property alias wallDir: jsonAdapter.wallDir
} }

View File

@ -41,7 +41,7 @@ FloatingWindow {
// 1. The File Scanner // 1. The File Scanner
FolderListModel { FolderListModel {
id: folderModel id: folderModel
folder: Settings.wallDir // <--- Your stash! folder: "file://" + Settings.wallDir // <--- Your stash!
nameFilters: ["*.png", "*.jpg", "*.jpeg"] nameFilters: ["*.png", "*.jpg", "*.jpeg"]
showDirs: false showDirs: false
} }
@ -86,6 +86,7 @@ FloatingWindow {
onClicked: { onClicked: {
let cleanPath = parent.modelData.fileUrl.toString().replace("file://", ""); let cleanPath = parent.modelData.fileUrl.toString().replace("file://", "");
Settings.currentWall = parent.modelData.fileUrl.toString(); Settings.currentWall = parent.modelData.fileUrl.toString();
console.log(Settings.currentWall);
} }
} }
} }