plugin: rust-side modules + theme services with serde-typed config
This commit is contained in:
parent
a86e90e927
commit
f34f3f2f4e
95 changed files with 2477 additions and 1011 deletions
|
|
@ -3,11 +3,12 @@ import Quickshell
|
|||
import "." as M
|
||||
import "../services" as S
|
||||
import "../applets" as C
|
||||
import NovaStats as NS
|
||||
|
||||
M.BarModule {
|
||||
id: root
|
||||
active: S.Modules.temperature.enable
|
||||
spacing: Math.max(1, S.Theme.moduleSpacing - 2)
|
||||
active: NS.ModulesService.temperatureEnable
|
||||
spacing: Math.max(1, NS.ThemeService.moduleSpacing - 2)
|
||||
tooltip: "Temperature: " + _temp + "\u00B0C"
|
||||
panelNamespace: "nova-temperature"
|
||||
panelContentWidth: 220
|
||||
|
|
@ -25,9 +26,9 @@ M.BarModule {
|
|||
}
|
||||
}
|
||||
|
||||
readonly property int _warm: S.Modules.temperature.warm || 80
|
||||
readonly property int _hot: S.Modules.temperature.hot || 90
|
||||
readonly property string _deviceFilter: S.Modules.temperature.device || ""
|
||||
readonly property int _warm: NS.ModulesService.temperatureWarm || 80
|
||||
readonly property int _hot: NS.ModulesService.temperatureHot || 90
|
||||
readonly property string _deviceFilter: NS.ModulesService.temperatureDevice || ""
|
||||
|
||||
readonly property int _temp: {
|
||||
if (_deviceFilter !== "") {
|
||||
|
|
@ -38,7 +39,7 @@ M.BarModule {
|
|||
return S.SystemStats.tempCelsius;
|
||||
}
|
||||
|
||||
property color _stateColor: _temp > _hot ? S.Theme.base08 : _temp > _warm ? S.Theme.base0A : root.accentColor
|
||||
property color _stateColor: _temp > _hot ? NS.ThemeService.base08 : _temp > _warm ? NS.ThemeService.base0A : root.accentColor
|
||||
Behavior on _stateColor {
|
||||
ColorAnimation {
|
||||
duration: 300
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue