Created
January 30, 2026 02:24
-
-
Save CarsonSlovoka/6dd5d30189ecf8f98421810c965737e3 to your computer and use it in GitHub Desktop.
simple hammerspoon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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