@
devtiange 受你的推荐的软件启发,用 hammerspoon 和 limelight 实现了根据输入法状态变化 limelight 的颜色,现在真是舒服啊!
[收藏的 limelight 源代码](
https://github.com/imkerberos/limelight)
```lua
local hs = hs
hs.keycodes.inputSourceChanged(function ()
if hs.keycodes.currentSourceID() == "
com.apple.keylayout.US"
or hs.keycodes.currentSourceID() == "com.apple.keylayout.ABC" then
print("==== change to US ====")
hs.execute("/nix/store/ahqry8gchidl4mpag5j7lzp8a0md7cq7-limelight-0.1.0/bin/limelight -m config active_color 0xFF7F9200")
else
print("==== change to CJK ====")
hs.execute("/nix/store/ahqry8gchidl4mpag5j7lzp8a0md7cq7-limelight-0.1.0/bin/limelight -m config active_color 0xFFFF2F92")
end
end)
```