mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 08:26:42 +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()
|
||||
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
|
||||
return obj
|
||||
|
||||
Reference in New Issue
Block a user