mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
migration(theming): redownload outdated color schemes to fix terminal format
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
function migrate(adapter, logger, rawJson) {
|
||||
logger.i("Settings", "Migrating settings to v56 (Color Scheme Migration)");
|
||||
|
||||
const scriptPath = Quickshell.shellDir + "/Scripts/python/src/theming/migrate-colorschemes.py";
|
||||
const configDir = Quickshell.env("NOCTALIA_CONFIG_DIR") || (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/noctalia";
|
||||
|
||||
logger.i("Settings", `Running color scheme migration script: ${scriptPath} with configDir: ${configDir}`);
|
||||
|
||||
// Run the migration script detached
|
||||
Quickshell.execDetached(["python3", scriptPath, configDir]);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,8 @@ QtObject {
|
||||
50: migration50Component,
|
||||
53: migration53Component,
|
||||
54: migration54Component,
|
||||
55: migration55Component
|
||||
55: migration55Component,
|
||||
56: migration56Component
|
||||
})
|
||||
|
||||
// Migration components
|
||||
@@ -52,4 +53,5 @@ QtObject {
|
||||
property Component migration53Component: Migration53 {}
|
||||
property Component migration54Component: Migration54 {}
|
||||
property Component migration55Component: Migration55 {}
|
||||
property Component migration56Component: Migration56 {}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ Singleton {
|
||||
- Default cache directory: ~/.cache/noctalia
|
||||
*/
|
||||
readonly property alias data: adapter // Used to access via Settings.data.xxx.yyy
|
||||
readonly property int settingsVersion: 55
|
||||
readonly property int settingsVersion: 56
|
||||
property bool isDebug: Quickshell.env("NOCTALIA_DEBUG") === "1"
|
||||
readonly property string shellName: "noctalia"
|
||||
readonly property string configDir: Quickshell.env("NOCTALIA_CONFIG_DIR") || (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/" + shellName + "/"
|
||||
|
||||
Reference in New Issue
Block a user