Skip to content

Commit

Permalink
fix: fix the problem that cannot launch app after hiding app
Browse files Browse the repository at this point in the history
  • Loading branch information
windvalley committed Dec 26, 2022
1 parent 9b08582 commit af4631b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app_launch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local apps = require "keybindings_config".apps
-- App显示或隐藏
local function toggleAppByBundleId(bundleID)
local frontApp = hs.application.frontmostApplication()
if frontApp:bundleID() == bundleID then
if frontApp:bundleID() == bundleID and frontApp:focusedWindow() then
frontApp:hide()
else
hs.application.launchOrFocusByBundleID(bundleID)
Expand Down

0 comments on commit af4631b

Please sign in to comment.