feat: added Tachometer widget to the CPU, GPU, and RAM module (#631)

This commit is contained in:
Serhiy Mytrovtsiy
2021-10-13 18:27:31 +02:00
parent 9163b35ecf
commit 4168862287
6 changed files with 36 additions and 0 deletions

View File

@@ -150,6 +150,12 @@ public class RAM: Module {
let free = Units(bytes: Int64(value.free)).getReadableMemory()
let used = Units(bytes: Int64(value.used)).getReadableMemory()
widget.setValue((free, used))
case let widget as Tachometer:
widget.setValue([
circle_segment(value: value.app/total, color: NSColor.systemBlue),
circle_segment(value: value.wired/total, color: NSColor.systemOrange),
circle_segment(value: value.compressed/total, color: NSColor.systemPink)
])
default: break
}
}