Team/TOOLS

[ OSX ] Hammerspoon

HEON.D 2022. 7. 23. 00:05

https://www.hammerspoon.org/

 

Hammerspoon

Hammerspoon What is Hammerspoon? This is a tool for powerful automation of macOS. At its core, Hammerspoon is just a bridge between the operating system and a Lua scripting engine. What gives Hammerspoon its power is a set of extensions that expose specifi

www.hammerspoon.org

Settings

-- init.lua
local english = "com.apple.keylayout.ABC"
local escapeBind

function setEnglish()
    local source = hs.keycodes.currentSourceID()
    if not (source == english) then
        hs.keycodes.currentSourceID(english)
    end
    escapeBind:disable()
    hs.eventtap.keyStroke({}, 'escape')
    escapeBind:enable()
end

escapeBind = hs.hotkey.new({}, 'escape', setEnglish):enable()
hs.hotkey.bind({'ctrl'}, 33, setEnglish)

 

'Team > TOOLS' 카테고리의 다른 글

[ Chrome ] 개발자모드 user agent 변경  (0) 2022.08.17
[ TOOLS ] oh my zsh  (0) 2022.08.01
[ TOOL ] 구름 입력기  (0) 2022.07.13
[ VSCODE ] Color Theme  (0) 2022.06.17
[ VSCODE ] dart 자동 교정 방지  (0) 2022.05.23