mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: cleaned up Speed widget by refactoring download/upload to input/output to make better logic for both modules: Disk and Network which have different meanings for these values.
This commit is contained in:
@@ -94,10 +94,19 @@
|
||||
<key>Icon</key>
|
||||
<string>chars</string>
|
||||
<key>Symbols</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Output</key>
|
||||
<string>W</string>
|
||||
<key>Input</key>
|
||||
<string>R</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Words</key>
|
||||
<dict>
|
||||
<key>Output</key>
|
||||
<string>Write</string>
|
||||
<key>Input</key>
|
||||
<string>Read</string>
|
||||
</dict>
|
||||
<key>Order</key>
|
||||
<integer>5</integer>
|
||||
</dict>
|
||||
|
||||
@@ -296,7 +296,7 @@ public class Disk: Module {
|
||||
self.menuBar.widgets.filter{ $0.isActive }.forEach { (w: SWidget) in
|
||||
switch w.item {
|
||||
case let widget as SpeedWidget:
|
||||
widget.setValue(upload: d.activity.write, download: d.activity.read)
|
||||
widget.setValue(input: d.activity.read, output: d.activity.write)
|
||||
case let widget as NetworkChart:
|
||||
widget.setValue(upload: Double(d.activity.write), download: Double(d.activity.read))
|
||||
if self.capacityReader?.interval != 1 {
|
||||
|
||||
Reference in New Issue
Block a user