Skip to content

Instantly share code, notes, and snippets.

@CarsonSlovoka
Created January 30, 2026 02:24
Show Gist options
  • Select an option

  • Save CarsonSlovoka/6dd5d30189ecf8f98421810c965737e3 to your computer and use it in GitHub Desktop.

Select an option

Save CarsonSlovoka/6dd5d30189ecf8f98421810c965737e3 to your computer and use it in GitHub Desktop.
simple hammerspoon
brew install hammerspoon
mkdir -v ~/.hammerspoon
tee -a ~/.hammerspoon/init.lua << EOF
hs.grid.setGrid('10x4') -- Tip: 鍵位其實就是鍵盤
hs.hotkey.bind({ "cmd" }, "r", function()
-- 善用快截鍵
hs.grid.show()
end)
hs.hotkey.bind({ "cmd", "ctrl" }, "f", function()
local win = hs.window.focusedWindow()
if win:isFullScreen() then
win:setFullscreen(false)
else
win:setFullscreen(true)
end
end)
hs.alert.show("config loaded")
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment