mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-10 17:08:39 +00:00
Merge pull request #26 from ad/master
fixed deminiaturization and Finder opening
This commit is contained in:
commit
0ce6648bf9
@ -92,20 +92,19 @@ class AppScrubberTouchBarItem: NSCustomTouchBarItem, NSScrubberDelegate, NSScrub
|
||||
}
|
||||
|
||||
public func didFinishInteracting(with scrubber: NSScrubber) {
|
||||
runningApplications[scrubber.selectedIndex].activate(options: [ .activateIgnoringOtherApps ])
|
||||
// runningApplications[scrubber.selectedIndex].activate(options: [ .activateIgnoringOtherApps ])
|
||||
|
||||
let bundleIdentifier = runningApplications[scrubber.selectedIndex].bundleIdentifier
|
||||
if bundleIdentifier!.contains("file://") {
|
||||
NSWorkspace.shared.openFile(bundleIdentifier!.replacingOccurrences(of: "file://", with: ""))
|
||||
|
||||
} else {
|
||||
NSWorkspace.shared.launchApplication(withBundleIdentifier: bundleIdentifier!, options: [.default], additionalEventParamDescriptor: nil, launchIdentifier: nil)
|
||||
}
|
||||
|
||||
// NB: if you can't open app which on another space, try to check mark
|
||||
// "When switching to an application, switch to a Space with open windows for the application"
|
||||
// in Mission control settings
|
||||
|
||||
// TODO: deminiaturize app
|
||||
// if let info = CGWindowListCopyWindowInfo(.optionOnScreenOnly, kCGNullWindowID) as? [[ String : Any]] {
|
||||
// for dict in info {
|
||||
// if dict["kCGWindowOwnerName"] as! String == runningApplications[scrubber.selectedIndex].localizedName {
|
||||
// print(dict["kCGWindowNumber"], dict["kCGWindowOwnerName"])
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9</string>
|
||||
<string>0.10</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user