NightLight: check if wlsunset exists, else dont enable NightLight

SystemMonitorSettings: If RAM usage is not toggled, don't show % option
Settings: remove NightLight from default bar widgets
This commit is contained in:
Ly-sec
2025-09-27 15:14:44 +02:00
parent 13e32dc11b
commit fe2654268d
5 changed files with 13 additions and 9 deletions
+6
View File
@@ -24,6 +24,12 @@ NIconButton {
icon: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "nightlight-forced" : "nightlight-on") : "nightlight-off"
tooltipText: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? I18n.tr("tooltips.night-light-forced") : I18n.tr("tooltips.night-light-enabled")) : I18n.tr("tooltips.night-light-disabled")
onClicked: {
// Check if wlsunset is available before enabling night light
if (!ProgramCheckerService.wlsunsetAvailable) {
ToastService.showWarning(I18n.tr("settings.display.night-light.section.label"), I18n.tr("toast.night-light.not-installed"))
return
}
if (!Settings.data.nightLight.enabled) {
Settings.data.nightLight.enabled = true
Settings.data.nightLight.forced = false
@@ -62,6 +62,7 @@ ColumnLayout {
label: I18n.tr("bar.widget-settings.system-monitor.memory-percentage")
checked: valueShowMemoryAsPercent
onToggled: checked => valueShowMemoryAsPercent = checked
visible: valueShowMemoryUsage
}
NToggle {