Closed zhanggang807 closed 3 years ago
这是切换啊,不是挺好的,你可以修改这段代码重新编译。
if let frontmostAppIdentifier = NSWorkspace.shared.frontmostApplication?.bundleIdentifier,
let targetAppIdentifier = Bundle(url: app.appBundleURL)?.bundleIdentifier,
frontmostAppIdentifier == targetAppIdentifier {
// 修改这里
NSRunningApplication.runningApplications(withBundleIdentifier: frontmostAppIdentifier).first?.hide()
} else {
NSWorkspace.shared.launchApplication(app.appName)
}
按两次快捷键 会显示 和隐藏,能不能不隐藏??