mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +00:00
feat(hammerspoon/apptoggle): add showAppInfo() utility function
This commit is contained in:
@@ -138,5 +138,16 @@ function obj:toggle(apps)
|
|||||||
return mostRecentApp:activate()
|
return mostRecentApp:activate()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- app_toggle:showAppInfo()
|
||||||
|
--- Method
|
||||||
|
--- Shows an alert with information about the frontmost application.
|
||||||
|
function obj:showAppInfo()
|
||||||
|
local app = hs.application.frontmostApplication()
|
||||||
|
|
||||||
|
hs.alert.show(app:name() .. " (" .. app:bundleID() .. ")")
|
||||||
|
hs.alert.show(app:path())
|
||||||
|
hs.alert.show("PID: " .. app:pid())
|
||||||
|
end
|
||||||
|
|
||||||
-- the end
|
-- the end
|
||||||
return obj
|
return obj
|
||||||
|
|||||||
Reference in New Issue
Block a user