Skip to content

Commit

Permalink
Merge pull request #199 from wakatime/main
Browse files Browse the repository at this point in the history
Release v5.1.0
  • Loading branch information
alanhamlett authored Feb 4, 2024
2 parents 36462f6 + 8b2bc99 commit 73a4df5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ To uninstall, move `WakaTime.app` into your mac Trash.

If you don’t use any other WakaTime plugins, run `rm -r ~/.wakatime*`.

## Supported Apps

Before requesting support for a new app, first check the [list of supported apps][supported apps].

## SwiftLint

To fix linter warning(s), run `swiftlint --fix`.
Expand All @@ -51,3 +55,4 @@ Made with :heart: by the WakaTime Team.
[dashboard]: https://wakatime.com/
[contributing]: CONTRIBUTING.md
[authors]: AUTHORS
[supported apps]: https://github.com/wakatime/macos-wakatime/blob/main/WakaTime/Extensions/NSRunningApplicationExtension.swift#L3
7 changes: 7 additions & 0 deletions WakaTime/Extensions/AXUIElementExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ extension AXUIElement {
title != "Safari"
else { return nil }
return title
case .safaripreview:
guard
let title = extractPrefix(rawTitle, separator: " - "),
title != "Safari",
title != "Safari Technology Preview"
else { return nil }
return title
case .imessage:
guard let title = extractPrefix(rawTitle, separator: " - ") else { return nil }
return title
Expand Down
2 changes: 2 additions & 0 deletions WakaTime/Extensions/NSRunningApplicationExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ enum MonitoredApp: String, CaseIterable {
case imessage = "com.apple.MobileSMS"
case postman = "com.postmanlabs.mac"
case safari = "com.apple.Safari"
case safaripreview = "com.apple.SafariTechnologyPreview"
case slack = "com.tinyspeck.slackmacgap"
case warp = "dev.warp.Warp-Stable"
case whatsapp = "net.whatsapp.WhatsApp"
Expand All @@ -29,6 +30,7 @@ enum MonitoredApp: String, CaseIterable {
static let electronAppIds = [MonitoredApp.postman.rawValue, MonitoredApp.figma.rawValue,
MonitoredApp.canva.rawValue, MonitoredApp.warp.rawValue,
MonitoredApp.slack.rawValue, MonitoredApp.safari.rawValue,
MonitoredApp.safaripreview.rawValue,
MonitoredApp.imessage.rawValue, MonitoredApp.chrome.rawValue,
MonitoredApp.arcbrowser.rawValue]
}
Expand Down
4 changes: 4 additions & 0 deletions WakaTime/Helpers/MonitoringManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ class MonitoringManager {
return HeartbeatData(
entity: title,
category: .browsing)
case .safaripreview:
return HeartbeatData(
entity: title,
category: .browsing)
case .chrome:
return HeartbeatData(
entity: title,
Expand Down

0 comments on commit 73a4df5

Please sign in to comment.