move Theme, SystemStats, Modules to shell/services/
This commit is contained in:
parent
197f6976e0
commit
989182d603
59 changed files with 432 additions and 388 deletions
|
|
@ -1,28 +1,29 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import "." as M
|
||||
import "../services" as S
|
||||
import "../applets" as C
|
||||
|
||||
M.BarSection {
|
||||
id: root
|
||||
spacing: Math.max(1, M.Theme.moduleSpacing - 2)
|
||||
spacing: Math.max(1, S.Theme.moduleSpacing - 2)
|
||||
tooltip: ""
|
||||
|
||||
readonly property int _warm: M.Modules.temperature.warm || 80
|
||||
readonly property int _hot: M.Modules.temperature.hot || 90
|
||||
readonly property string _deviceFilter: M.Modules.temperature.device || ""
|
||||
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 || ""
|
||||
|
||||
// If a device filter is set, use that device's temp; otherwise fall back to system max
|
||||
readonly property int _temp: {
|
||||
if (_deviceFilter !== "") {
|
||||
const dev = M.SystemStats.tempDevices.find(d => d.name === _deviceFilter);
|
||||
const dev = S.SystemStats.tempDevices.find(d => d.name === _deviceFilter);
|
||||
if (dev)
|
||||
return dev.celsius;
|
||||
}
|
||||
return M.SystemStats.tempCelsius;
|
||||
return S.SystemStats.tempCelsius;
|
||||
}
|
||||
|
||||
property color _stateColor: _temp > _hot ? M.Theme.base08 : _temp > _warm ? M.Theme.base0A : root.accentColor
|
||||
property color _stateColor: _temp > _hot ? S.Theme.base08 : _temp > _warm ? S.Theme.base0A : root.accentColor
|
||||
Behavior on _stateColor {
|
||||
ColorAnimation {
|
||||
duration: 300
|
||||
|
|
@ -81,8 +82,8 @@ M.BarSection {
|
|||
temp: root._temp
|
||||
warm: root._warm
|
||||
hot: root._hot
|
||||
history: M.SystemStats.tempHistory
|
||||
devices: M.SystemStats.tempDevices
|
||||
history: S.SystemStats.tempHistory
|
||||
devices: S.SystemStats.tempDevices
|
||||
accentColor: root.accentColor
|
||||
deviceFilter: root._deviceFilter
|
||||
active: root._showPanel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue