Settings Service: Create the .cache/noctalia folder, use default wallpaper
This commit is contained in:
parent
457033b979
commit
e1edfd3689
2 changed files with 15 additions and 8 deletions
|
|
@ -8,9 +8,8 @@ Variants {
|
||||||
|
|
||||||
delegate: PanelWindow {
|
delegate: PanelWindow {
|
||||||
required property ShellScreen modelData
|
required property ShellScreen modelData
|
||||||
property string wallpaperSource: Qt.resolvedUrl("../../Assets/Tests/wallpaper.png")
|
property string wallpaperSource: Settings.data.wallpaper.current
|
||||||
|
|
||||||
//property string wallpaperSource: Qt.resolvedUrl("/home/lysec/Pictures/wallpapers/wallhaven-6lqvql.jpg")
|
|
||||||
visible: wallpaperSource !== ""
|
visible: wallpaperSource !== ""
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
screen: modelData
|
screen: modelData
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,28 @@ import qs.Services
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
|
id: root
|
||||||
|
|
||||||
property string shellName: "noctalia"
|
property string shellName: "noctalia"
|
||||||
property string settingsDir: Quickshell.env("NOCTALIA_SETTINGS_DIR")
|
property string configDir: Quickshell.env("NOCTALIA_CONFIG_DIR")
|
||||||
|| (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env(
|
|| (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env(
|
||||||
"HOME") + "/.config") + "/" + shellName + "/"
|
"HOME") + "/.config") + "/" + shellName + "/"
|
||||||
property string settingsFile: Quickshell.env("NOCTALIA_SETTINGS_FILE") || (settingsDir + "settings.json")
|
property string cacheDir: Quickshell.env("NOCTALIA_CACHE_DIR")
|
||||||
property string colorsFile: Quickshell.env("NOCTALIA_COLORS_FILE") || (settingsDir + "colors.json")
|
|| (Quickshell.env("XDG_CACHE_HOME") || Quickshell.env(
|
||||||
|
"HOME") + "/.cache") + "/" + shellName + "/"
|
||||||
|
property string settingsFile: Quickshell.env("NOCTALIA_SETTINGS_FILE") || (configDir + "settings.json")
|
||||||
|
property string colorsFile: Quickshell.env("NOCTALIA_COLORS_FILE") || (configDir + "colors.json")
|
||||||
property var data: settingAdapter
|
property var data: settingAdapter
|
||||||
|
|
||||||
|
property string defaultWallpaper: Qt.resolvedUrl("../Assets/Tests/wallpaper.png")
|
||||||
|
|
||||||
// Needed to only have one NPanel loaded at a time.
|
// Needed to only have one NPanel loaded at a time.
|
||||||
// property var openPanel: null
|
// property var openPanel: null
|
||||||
Item {
|
Item {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
// ensure settings dir
|
// ensure settings dir exists
|
||||||
Quickshell.execDetached(["mkdir", "-p", settingsDir])
|
Quickshell.execDetached(["mkdir", "-p", configDir])
|
||||||
|
Quickshell.execDetached(["mkdir", "-p", cacheDir])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,7 +104,7 @@ Singleton {
|
||||||
|
|
||||||
wallpaper: JsonObject {
|
wallpaper: JsonObject {
|
||||||
property string directory: "/usr/share/wallpapers"
|
property string directory: "/usr/share/wallpapers"
|
||||||
property string current: ""
|
property string current: defaultWallpaper
|
||||||
property bool isRandom: false
|
property bool isRandom: false
|
||||||
property int randomInterval: 300
|
property int randomInterval: 300
|
||||||
property bool generateTheme: false
|
property bool generateTheme: false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue