osascript -e '
tell application "System Events"
-- 获取当前前台应用程序的名称
set frontApp to name of first process whose frontmost is true
tell application "Finder"
-- 获取屏幕分辨率
set screenResolution to bounds of window of desktop
set screenWidth to item 3 of screenResolution as text
set screenHeight to item 4 of screenResolution as text
-- 返回应用名称和分辨率
return frontApp & ": " & screenWidth & "x" & screenHeight
end tell
end tell
'