Hammerspoon ์๋ํ
Hammerspoon ๋จ์ถํค, launchd ์๋น์ค, Ghostty ์ฐ๋ ๊ฐ์ด๋์
๋๋ค.
๋ชฉ์ ๊ณผ ๋ฒ์
macOS์์ Hammerspoon ์๋ํ, launchd ์ฐ๊ณ, Ghostty ๋์ ์ด์๋ฅผ ์ง๋จํ๊ณ ๋ณต๊ตฌํ๋ ์ ์ฐจ๋ฅผ ๋ค๋ฃฌ๋ค.
ํต์ฌ ์ ์ฐจ
~/.hammerspoon/init.lua์ LaunchAgent ์ํ๋ฅผ ํจ๊ป ์ ๊ฒํ๋ค.
launchctl list๋ก ๋น์ ์ agent๋ฅผ ์๋ณํ๋ค.
- Ghostty ๋ค์ค ์ธ์คํด์ค/๋จ์ถํค ๋ฌธ์ ๋ฅผ ์ฌํ ํ ์ค์ ์ ์์ ํ๋ค.
- ์ฌ๋ก๋ ํ ํต์ฌ ๋จ์ถํค ๋์์ ๊ฒ์ฆํ๋ค.
Known Issues
darwin-rebuild ์ setupLaunchAgents ๋ฉ์ถค
- launchd agent๊ฐ ์ ๋๋ก ์ข
๋ฃ๋์ง ์์ผ๋ฉด ๋ฉ์ถ ์ ์์
- ํด๊ฒฐ:
launchctl list | grep -v com.apple ํ์ธ ํ ๋ฌธ์ agent ์ ๊ฑฐ
ํ๊ธ ์
๋ ฅ์์ค์์ Ctrl/Opt ๋จ์ถํค
- macOS ๊ธฐ๋ณธ ๋์์ผ๋ก ํ๊ธ IME์์ Ctrl/Opt ํค ์กฐํฉ์ด ๋์ ์ ํจ
- Hammerspoon์์ eventtap์ผ๋ก ๊ฐ์ ์ฒ๋ฆฌ
Ghostty ์ ์ธ์คํด์ค ๋ฌธ์
- Ghostty ๋ฐ์ด๋๋ฆฌ๋ฅผ ์ง์ ์คํํ๋ฉด ์ ์ธ์คํด์ค๋ก ์ด๋ฆด ์ ์์ (Dock์ ์ฌ๋ฌ ์์ด์ฝ)
- ํด๊ฒฐ: ์คํ ์ค์ด๋ฉด
hs.application.get("Ghostty") + Cmd+N, ๋ฏธ์คํ์ด๋ฉด open -a Ghostty
๋น ๋ฅธ ์ฐธ์กฐ
์ฃผ์ ๋จ์ถํค
| ๋จ์ถํค |
๋์ |
Ctrl+Option+Cmd+T |
Finder์์ ํ์ฌ ํด๋๋ก Ghostty ์ด๊ธฐ |
Ctrl+; |
์์ด ์
๋ ฅ์ผ๋ก ์ ํ |
Cmd+Shift+Space |
์์ด ์ ํ ํ Homerow ์คํ |
Ctrl+B |
์์ด ์ ํ ํ tmux prefix ์ ๋ฌ |
| ํฐ๋ฏธ๋ Ctrl/Opt ๋จ์ถํค |
ํํ ๋ชฉ๋ก์ references/hotkeys.md, ์ ๋ณธ ๋ฐฐ์ด์ modules/darwin/programs/hammerspoon/files/init.lua |
ํํ ์ฒ๋ฆฌ ํค ํ์ธ:
grep -n "ghosttyCtrlKeys" modules/darwin/programs/hammerspoon/files/init.lua
grep -n "terminalOptKeys" modules/darwin/programs/hammerspoon/files/init.lua
์ค์ ํ์ผ ์์น
| ํ์ผ |
์ฉ๋ |
modules/darwin/programs/hammerspoon/default.nix |
Nix ๋ชจ๋ (ํ์ผ ๋ฐฐํฌ ์ ์ธ) |
modules/darwin/programs/hammerspoon/files/init.lua |
Hammerspoon ๋ฉ์ธ ์ค์ (์์ค) |
modules/darwin/programs/hammerspoon/files/foundation_remapping.lua |
Caps Lock โ F18 ๋ฆฌ๋งคํ (์์ค) |
~/Library/LaunchAgents/ |
launchd ์ฌ์ฉ์ ์์ด์ ํธ |
launchd ๋๋ฒ๊น
# ํ์ฌ ๋ก๋๋ ์์ด์ ํธ ํ์ธ
launchctl list | grep -v com.apple
# ํน์ ์์ด์ ํธ ์ํ
launchctl list <label>
# ์์ด์ ํธ ์ธ๋ก๋ (๊ถ์ฅ)
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/<plist>
# ์์ด์ ํธ ๋ก๋ (๊ถ์ฅ)
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/<plist>
# ๋ ๊ฑฐ์ ๋ช
๋ น (deprecated, ํธํ์ฉ)
launchctl unload ~/Library/LaunchAgents/<plist>
launchctl load ~/Library/LaunchAgents/<plist>
์์ฃผ ๋ฐ์ํ๋ ๋ฌธ์
- darwin-rebuild ๋ฉ์ถค: launchd agent ์ถฉ๋, ์๋ ์ธ๋ก๋ ํ์
- HOME์ด /var/root: launchd ํ๊ฒฝ์์ HOME ๋ฏธ์ค์
- open --args ๋ฌด์: ์ด๋ฏธ ์คํ ์ค์ธ ์ฑ์ ์ธ์ ์ ๋ฌ ์ ๋จ
๋ ํผ๋ฐ์ค