This repository has been archived on 2026-07-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
nova-shell/modules/Temperature.qml

27 lines
817 B
QML

import QtQuick
import "." as M
M.BarSection {
id: root
spacing: Math.max(1, M.Theme.moduleSpacing - 2)
tooltip: "Temperature: " + M.SystemStats.tempCelsius + "\u00B0C"
property color _stateColor: M.SystemStats.tempCelsius > (M.Modules.temperature.hot || 80) ? M.Theme.base09 : M.SystemStats.tempCelsius > (M.Modules.temperature.warm || 60) ? M.Theme.base0A : root.accentColor
Behavior on _stateColor {
ColorAnimation {
duration: 300
}
}
M.BarIcon {
icon: "\uF2C9"
color: root._stateColor
anchors.verticalCenter: parent.verticalCenter
}
M.BarLabel {
label: M.SystemStats.tempCelsius + "\u00B0C"
minText: "100\u00B0C"
color: root._stateColor
anchors.verticalCenter: parent.verticalCenter
}
}