feat: add dark-mode in the debug profile on reports

This commit is contained in:
Louis Pontoise authored and lwouis committed 2020-04-09 00:04:18 +09:00
1 parent b99b40fc02
commit a54eb77b18
2 files changed
+3 -5

No files matched your search

+3 -1
View File
@@ -19,9 +19,11 @@ class DebugProfile {
("OS architecture", Sysctl.run("hw.machine")),
("Locale", Locale.current.debugDescription),
("Spaces count", String((CGSCopyManagedDisplaySpaces(cgsMainConnectionId) as! [NSDictionary]).map { $0["Spaces"] }.count)),
("Dark mode", Preferences.getString("AppleInterfaceStyle") ?? "Light"),
("\"Displays have separate Spaces\"", NSScreen.screensHaveSeparateSpaces ? "checked" : "unchecked"),
// hardware
("Hardware model", Sysctl.run("hw.model")),
("Displays count", String(NSScreen.screens.count)),
("Screens count", String(NSScreen.screens.count)),
("CPU model", Sysctl.run("machdep.cpu.brand_string")),
("Memory size", ByteCountFormatter.string(fromByteCount: Int64(ProcessInfo.processInfo.physicalMemory), countStyle: .file)),
// TODO: add gpu model(s)
-4
View File
@@ -79,10 +79,6 @@ class Preferences {
defaults.register(defaults: defaultValues)
}
static func getObject(_ key: String) -> Any? {
defaults.object(forKey: key)
}
static func getString(_ key: String) -> String? {
defaults.string(forKey: key)
}