说明 在 ibreathbsb 同学的代码上,增加了应用启动时的检查并自动切换输入法的功能。 使用方式 将input-switching.lua 中的代码复制到 .hammerspoon/init.lua。 如果要自定义应用程序,直接在脚本里app2Ime处填写应用路径和输入法名字即可。 鸣谢 感谢 ibreathbsb 同学:https://gist.github.com/ibreathebsb/65fae9d742c5ebdb409960bceaf934de