- fix cpu usage in list;

- fix default widgets in network and battery;
- remove CHANGELOG.md (replaced with git tags);
This commit is contained in:
Serhiy Mytrovtsiy
2020-04-04 16:08:41 +02:00
parent b448979aa2
commit 2e718e52cd
5 changed files with 6 additions and 187 deletions

View File

@@ -1,181 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
### [v1.5.2]
- fixed crashing
### [v1.5.1]
- now update open downloaded file, not just file with name Stats.dmg
- add a popup view for network module
- new reader in network module
- fix changing active popup view when switching the tabs
- remove Carthage vendor folder from project
- small fixes
### [v1.5.0]
- change modules
- a lot of improvements related to widget updates
- remove observability from application
- improve CPU and battery consumption
- improve widgets
- now charts updates only if a popup is opened
- widgets refactored
- a lot of small fixes
### [v1.4.0]
- fix bug when readers work in disabled modules
- replace NSTimer with GCD
- fix GCD initialization
- starting to remove observable from project (because of memory leak)
- a new version will be download and mount automatically
- fully rewritten menuBar
- remove observability from AppDelegate, MenuBar
- additional readers read fix
- small fixes
### [v1.3.5]
- removed first empty point from CPU and Memory charts
- percentage value disabled if battery is fully charged
- removed n/a from battery time
- small fixes
### [v1.3.4]
- rewrited readers for Top Processes in CPU and Memory modules
- improved power consumption
### [v1.3.3]
- new option to set update time for each module
- fixed widget initialization
### [v1.3.2]
- new battery widget with time remaining
- rewrited battery widget
- new menu item to open Activity Monitor
### [v1.3.1]
- fixed battery widget width
- fixed initWidget function in battery module
- new build and update algorithm for menu bar
- added view with empty text in popup when no active module
- changed the source for battery charging information
- changed battery widget percentage view
- fixed values visibility in network widget
- fixed parsing data from top output in cpu and memory reader
### [v1.3.0]
- CPU hyperthreading mode disabled by default in bar chart widget
- added view for CPU module
- added view for Memory module
- added view for Battery module
- changed the menu item with preferences to list
- improved widgets draw algorithm
- implemented view for modules with charts and some information
- moved from own implementation to LauncAtLogin library
- fixed a lot of bugs
### [v1.2.13]
- changed version checker logic
### [v1.2.12]
- module settings are unavailable if the module is turned off
- fixed battery module visibility when disabled
### [v1.2.11]
- fixed network text widget visibility
### [v1.2.10]
- moved to swift 5
- fixed start on boot
### [v1.2.9]
- fixed start on boot button
- changed the weight of some fonts
### [v1.2.8]
- small changes in Widgets structure
- widgets settings moved from modules to widgets
- fixed Bar chart visibility on start
- small changes in Widget protocol
- appStore mode added
- fixed few bugs
### [v1.2.7]
- added hyperthreading mode in Bar Chart for CPU
- fixed few bugs
### [v1.2.6]
- fixed CPU usage
### [v1.2.5]
- added chart bar widget for CPU, Memory and Disk module
- label in Charts are enabled by default
- color and label option are visible only if available in selected widget
- fixed few bugs
### [v1.2.4]
- fixed bug when widgets don't display properly (or don't shows at all)
- initialized bar chart widget
- fixed few bugs
### [v1.2.3]
- new icon
- small code refactoring
- changed font style name of the indicator in the Chart/Chart with value
- added dock icon visibility to preferences
- moved color and label preference from global to local (now each module can be configurated separately)
- now check for updates on start can be disabled in preferences
- fixed few bugs
### [v1.2.2]
- fully automated build and sign app process
- fixed update and about visibility window in dark mode
- added name of the indicators in the Chart/Chart with value
- added check for new version on start
- removed charts and charts with value to Disk module
- now module submenu is disabled if module is disabled
- fixed bug when network module stop working after turn on/of
- fixed few bugs
### [v1.2.1]
- added charts and charts with value to Disk module
- fixed bug when Chart with value does not shows
### [v1.2.0]
- added network module
- added Check for updates window
- fixed few bugs
### [v1.1.0]
- added battery module
- added chart widget for CPU and Memory
- added About Stats window
### [v1.0.0]
- first release
[v1.5.2]: https://github.com/exelban/stats/releases/tag/v1.5.2
[v1.5.1]: https://github.com/exelban/stats/releases/tag/v1.5.1
[v1.5.0]: https://github.com/exelban/stats/releases/tag/v1.5.0
[v1.4.0]: https://github.com/exelban/stats/releases/tag/v1.4.0
[v1.3.5]: https://github.com/exelban/stats/releases/tag/v1.3.5
[v1.3.4]: https://github.com/exelban/stats/releases/tag/v1.3.4
[v1.3.3]: https://github.com/exelban/stats/releases/tag/v1.3.3
[v1.3.2]: https://github.com/exelban/stats/releases/tag/v1.3.2
[v1.3.1]: https://github.com/exelban/stats/releases/tag/v1.3.1
[v1.3.0]: https://github.com/exelban/stats/releases/tag/v1.3.0
[v1.2.13]: https://github.com/exelban/stats/releases/tag/v1.2.13
[v1.2.12]: https://github.com/exelban/stats/releases/tag/v1.2.12
[v1.2.11]: https://github.com/exelban/stats/releases/tag/v1.2.11
[v1.2.10]: https://github.com/exelban/stats/releases/tag/v1.2.10
[v1.2.9]: https://github.com/exelban/stats/releases/tag/v1.2.9
[v1.2.8]: https://github.com/exelban/stats/releases/tag/v1.2.8
[v1.2.7]: https://github.com/exelban/stats/releases/tag/v1.2.7
[v1.2.6]: https://github.com/exelban/stats/releases/tag/v1.2.6
[v1.2.5]: https://github.com/exelban/stats/releases/tag/v1.2.5
[v1.2.4]: https://github.com/exelban/stats/releases/tag/v1.2.4
[v1.2.3]: https://github.com/exelban/stats/releases/tag/v1.2.3
[v1.2.2]: https://github.com/exelban/stats/releases/tag/v1.2.2
[v1.2.1]: https://github.com/exelban/stats/releases/tag/v1.2.1
[v1.2.0]: https://github.com/exelban/stats/releases/tag/v1.2.0
[v1.1.0]: https://github.com/exelban/stats/releases/tag/v1.1.0
[v1.0.0]: https://github.com/exelban/stats/releases/tag/v1.0.0

View File

@@ -49,7 +49,7 @@ class Battery: Module {
if !self.available { return }
self.enabled = defaults.object(forKey: name) != nil ? defaults.bool(forKey: name) : true
self.widget.type = defaults.object(forKey: "\(name)_widget") != nil ? defaults.float(forKey: "\(name)_widget") : Widgets.Mini
self.widget.type = defaults.object(forKey: "\(name)_widget") != nil ? defaults.float(forKey: "\(name)_widget") : Widgets.Battery
self.initWidget()
self.initMenu()

View File

@@ -72,11 +72,11 @@ class CPUProcessReader: Reader {
if index != 0 {
var str = line.trimmingCharacters(in: .whitespaces)
let pidString = str.findAndCrop(pattern: "^\\d+")
let usageString = str.findAndCrop(pattern: "^[0-9]+\\.[0-9]* ")
let usageString = str.findAndCrop(pattern: "^[0-9,.]+ ")
let command = str.trimmingCharacters(in: .whitespaces)
let pid = Int(pidString) ?? 0
let usage = Double(usageString) ?? 0
let usage = Double(usageString.replacingOccurrences(of: ",", with: ".")) ?? 0
processes.append(TopProcess(pid: pid, command: command, usage: usage))
}

View File

@@ -40,7 +40,7 @@ class Network: Module {
if !self.available { return }
self.enabled = defaults.object(forKey: name) != nil ? defaults.bool(forKey: name) : true
self.widget.type = defaults.object(forKey: "\(name)_widget") != nil ? defaults.float(forKey: "\(name)_widget") : Widgets.Mini
self.widget.type = defaults.object(forKey: "\(name)_widget") != nil ? defaults.float(forKey: "\(name)_widget") : Widgets.NetworkDots
self.initWidget()
self.initMenu()

View File

@@ -30,7 +30,7 @@ class Mini: NSView, Widget {
let xOffset: CGFloat = 1.0
let labelView = NSTextField(frame: NSMakeRect(xOffset, 13, self.frame.size.width, 7))
let labelView = NSTextField(frame: NSMakeRect(xOffset, 13, self.frame.size.width, 9))
labelView.isEditable = false
labelView.isSelectable = false
labelView.isBezeled = false
@@ -39,7 +39,7 @@ class Mini: NSView, Widget {
labelView.backgroundColor = .controlColor
labelView.canDrawSubviewsIntoLayer = true
labelView.alignment = .natural
labelView.font = NSFont.systemFont(ofSize: 7, weight: .light)
labelView.font = NSFont.systemFont(ofSize: 8, weight: .light)
labelView.stringValue = String(self.name.prefix(3)).uppercased()
labelView.addSubview(NSView())