1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-15 00:00:10 +00:00

Merge branch 'main' of github.com:tw93/Mole

This commit is contained in:
Tw93
2025-12-11 14:28:18 +08:00

View File

@@ -539,7 +539,7 @@ func renderBatteryCard(batts []BatteryStatus, thermal ThermalStatus) cardData {
if b.CycleCount > 0 { if b.CycleCount > 0 {
healthParts = append(healthParts, fmt.Sprintf("%d cycles", b.CycleCount)) healthParts = append(healthParts, fmt.Sprintf("%d cycles", b.CycleCount))
} }
// Add temperature if available // Add temperature if available
if thermal.CPUTemp > 0 { if thermal.CPUTemp > 0 {
tempStyle := subtleStyle tempStyle := subtleStyle
@@ -550,12 +550,12 @@ func renderBatteryCard(batts []BatteryStatus, thermal ThermalStatus) cardData {
} }
healthParts = append(healthParts, tempStyle.Render(fmt.Sprintf("%.0f°C", thermal.CPUTemp))) healthParts = append(healthParts, tempStyle.Render(fmt.Sprintf("%.0f°C", thermal.CPUTemp)))
} }
// Add fan speed if available // Add fan speed if available
if thermal.FanSpeed > 0 { if thermal.FanSpeed > 0 {
healthParts = append(healthParts, fmt.Sprintf("%d RPM", thermal.FanSpeed)) healthParts = append(healthParts, fmt.Sprintf("%d RPM", thermal.FanSpeed))
} }
if len(healthParts) > 0 { if len(healthParts) > 0 {
lines = append(lines, subtleStyle.Render(strings.Join(healthParts, " · "))) lines = append(lines, subtleStyle.Render(strings.Join(healthParts, " · ")))
} }