Skip to content

Commit 4863faf

Browse files
committed
Add workaround for #20
1 parent e63cfb4 commit 4863faf

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

MenuBarDock/AppTracker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ protocol AppTrackerDelegate: AnyObject {
1515

1616
// tracks app activations and quits
1717
class AppTracker {
18-
1918
public weak var delegate: AppTrackerDelegate?
2019

2120
init() {
2221
trackAppsBeingActivated()
2322
trackAppsBeingQuit()
2423
}
24+
2525
private func trackAppsBeingActivated() {
2626
NSWorkspace.shared.notificationCenter.addObserver(forName: NSWorkspace.didActivateApplicationNotification, object: nil, queue: .main) { (notification) in
2727
if

MenuBarDock/OpenableApp.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ class OpenableApp {
140140

141141
private func launchApp() {
142142
print("Launching app: ", name)
143+
144+
// workaround needed to open Steam, otherwise it opens the app path in Finder
145+
if bundleId == "com.valvesoftware.steam" {
146+
NSWorkspace.shared.launchApplication(withBundleIdentifier: "com.valvesoftware.steam", options: [], additionalEventParamDescriptor: nil, launchIdentifier: nil)
147+
return
148+
}
149+
143150
if #available(OSX 10.15, *) {
144151
let config = NSWorkspace.OpenConfiguration()
145152
config.activates = true

0 commit comments

Comments
 (0)