From ec1c834e581530a97470e8cf9df21e74a56bf207 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Tue, 17 Nov 2020 16:50:55 +0100 Subject: [PATCH] - add pid to the process toolTip in the top processes --- Modules/Battery/popup.swift | 1 + Modules/CPU/popup.swift | 1 + Modules/GPU/reader.swift | 1 - Modules/Memory/popup.swift | 1 + Modules/Net/popup.swift | 1 + Stats/AppDelegate.swift | 1 + Stats/Supporting Files/Info.plist | 2 +- 7 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Modules/Battery/popup.swift b/Modules/Battery/popup.swift index 197d2055..d5bb494c 100644 --- a/Modules/Battery/popup.swift +++ b/Modules/Battery/popup.swift @@ -262,6 +262,7 @@ internal class Popup: NSView, Popup_p { self.processes[index].label = process.name != nil ? process.name! : process.command self.processes[index].value = "\(process.usage)%" self.processes[index].icon = process.icon + self.processes[index].toolTip = "pid: \(process.pid)" } } diff --git a/Modules/CPU/popup.swift b/Modules/CPU/popup.swift index 359701b8..4449ad77 100644 --- a/Modules/CPU/popup.swift +++ b/Modules/CPU/popup.swift @@ -244,6 +244,7 @@ internal class Popup: NSView, Popup_p { self.processes[index].label = process.name != nil ? process.name! : process.command self.processes[index].value = "\(process.usage)%" self.processes[index].icon = process.icon + self.processes[index].toolTip = "pid: \(process.pid)" } } diff --git a/Modules/GPU/reader.swift b/Modules/GPU/reader.swift index b00243e1..68055a70 100644 --- a/Modules/GPU/reader.swift +++ b/Modules/GPU/reader.swift @@ -32,7 +32,6 @@ internal class InfoReader: Reader { } let devices = PCIdevices.filter{ $0.object(forKey: "IOName") as? String == "display" } - print("------------", Date(), "------------", to: &Log.log) print("Found \(devices.count) devices", to: &Log.log) devices.forEach { (dict: NSDictionary) in diff --git a/Modules/Memory/popup.swift b/Modules/Memory/popup.swift index c483509b..b3affae9 100644 --- a/Modules/Memory/popup.swift +++ b/Modules/Memory/popup.swift @@ -239,6 +239,7 @@ internal class Popup: NSView, Popup_p { self.processes[index].label = process.name != nil ? process.name! : process.command self.processes[index].value = Units(bytes: Int64(process.usage)).getReadableMemory() self.processes[index].icon = process.icon + self.processes[index].toolTip = "pid: \(process.pid)" } } diff --git a/Modules/Net/popup.swift b/Modules/Net/popup.swift index 34a3a304..dcd708a7 100644 --- a/Modules/Net/popup.swift +++ b/Modules/Net/popup.swift @@ -360,6 +360,7 @@ internal class Popup: NSView, Popup_p { self.processes[index].upload = Units(bytes: Int64(process.upload)).getReadableSpeed(base: DataSizeBase(rawValue: self.base) ?? .byte) self.processes[index].download = Units(bytes: Int64(process.download)).getReadableSpeed(base: DataSizeBase(rawValue: self.base) ?? .byte) self.processes[index].icon = process.icon + self.processes[index].toolTip = "pid: \(process.pid)" } } diff --git a/Stats/AppDelegate.swift b/Stats/AppDelegate.swift index b03771af..2b16c15c 100755 --- a/Stats/AppDelegate.swift +++ b/Stats/AppDelegate.swift @@ -43,6 +43,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele func applicationDidFinishLaunching(_ aNotification: Notification) { let startingPoint = Date() + print("------------", startingPoint, "------------", to: &Log.log) self.parseArguments() diff --git a/Stats/Supporting Files/Info.plist b/Stats/Supporting Files/Info.plist index 691a8ba5..d2529fe3 100755 --- a/Stats/Supporting Files/Info.plist +++ b/Stats/Supporting Files/Info.plist @@ -17,7 +17,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 163 + 164 Description Simple macOS system monitor in your menu bar LSApplicationCategoryType