Files
omarchy/shell/plugins/bar/indicators/NightLight.qml
T
ZacharyZhang-NY a9b39710a2 Add Simplified Chinese as a system language
The installer asks for the language before the keyboard, and
Setup > Language (omarchy language en|zh) switches it later. Under
zh_CN the menu reads its labels from omarchy-menu.zh-cn.jsonc, the
shell from I18nZh.js through I18n.tr, and notifications are worded
by their sender through omarchy-text, which reads the same table.
User text is never translated.
2026-10-12 02:56:40 -04:00

22 lines
524 B
QML

import QtQuick
import qs.Commons
import qs.Ui
BarIndicator {
id: root
readonly property var nightlightService: bar?.shell?.firstPartyServiceFor("omarchy.nightlight")
active: nightlightService ? nightlightService.enabled : false
activeText: "󰔎"
inactiveText: "󰔎"
activeTooltipText: I18n.tr("Day Light")
inactiveTooltipText: I18n.tr("Night Light")
function toggle() {
if (root.nightlightService) root.nightlightService.setNightlight(!root.active)
}
onPressed: function() { root.toggle() }
}