mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
@@ -944,6 +944,8 @@
|
||||
"predefined-desc": "Choose from a collection of predefined color schemes.",
|
||||
"predefined-generate-templates-label": "Generate templates for predefined schemes",
|
||||
"predefined-title": "Predefined color schemes",
|
||||
"sync-gsettings-description": "Match the system theme to the active light or dark variant.",
|
||||
"sync-gsettings-label": "Sync system theme",
|
||||
"templates-desc": "Apply colors to external applications.",
|
||||
"templates-filter-description": "Show templates from a specific category.",
|
||||
"templates-filter-label": "Filter by category",
|
||||
|
||||
@@ -504,7 +504,8 @@
|
||||
"manualSunrise": "06:30",
|
||||
"manualSunset": "18:30",
|
||||
"generationMethod": "tonal-spot",
|
||||
"monitorForColors": ""
|
||||
"monitorForColors": "",
|
||||
"syncGsettings": true
|
||||
},
|
||||
"templates": {
|
||||
"activeTemplates": [],
|
||||
|
||||
@@ -524,6 +524,15 @@
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.colors"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.color-scheme.sync-gsettings-label",
|
||||
"descriptionKey": "panels.color-scheme.sync-gsettings-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 2,
|
||||
"tabLabel": "panels.color-scheme.title",
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.colors"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.color-scheme.dark-mode-mode-label",
|
||||
"descriptionKey": "panels.color-scheme.dark-mode-mode-description",
|
||||
|
||||
@@ -710,6 +710,7 @@ Singleton {
|
||||
property string manualSunset: "18:30"
|
||||
property string generationMethod: "tonal-spot"
|
||||
property string monitorForColors: ""
|
||||
property bool syncGsettings: true
|
||||
}
|
||||
|
||||
// templates toggles
|
||||
|
||||
@@ -118,6 +118,18 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.color-scheme.sync-gsettings-label")
|
||||
description: I18n.tr("panels.color-scheme.sync-gsettings-description")
|
||||
checked: Settings.data.colorSchemes.syncGsettings
|
||||
onToggled: checked => {
|
||||
Settings.data.colorSchemes.syncGsettings = checked;
|
||||
if (checked) {
|
||||
ColorSchemeService.pushSystemColorScheme();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
label: I18n.tr("panels.color-scheme.dark-mode-mode-label")
|
||||
description: I18n.tr("panels.color-scheme.dark-mode-mode-description")
|
||||
|
||||
@@ -18,6 +18,8 @@ Singleton {
|
||||
readonly property string gtkRefreshScript: Quickshell.shellDir + "/Scripts/python/src/theming/gtk-refresh.py"
|
||||
|
||||
function pushSystemColorScheme() {
|
||||
if (!Settings.data.colorSchemes.syncGsettings)
|
||||
return;
|
||||
const mode = Settings.data.colorSchemes.darkMode ? "dark" : "light";
|
||||
Quickshell.execDetached(["python3", gtkRefreshScript, "--appearance-only", mode]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user