diff options
| author | Simen A. W. Olsen <so@bjerk.io> | 2023-12-27 00:41:12 +0100 |
|---|---|---|
| committer | Simen A. W. Olsen <so@bjerk.io> | 2023-12-27 00:41:12 +0100 |
| commit | 891fad07f520115bb2f44c8e9ed45726a465e3a5 (patch) | |
| tree | 90224e9c4eae25b63248b7266cd0bfbc302e9bc8 /.hammerspoon | |
| parent | 4a2edf5a0f86ce3be0f8124cdb4dcad788f4784e (diff) | |
| download | dotfiles-891fad07f520115bb2f44c8e9ed45726a465e3a5.tar.gz dotfiles-891fad07f520115bb2f44c8e9ed45726a465e3a5.zip | |
more vim and hammerspoon
Diffstat (limited to '.hammerspoon')
| -rw-r--r-- | .hammerspoon/hyper.lua | 23 | ||||
| -rw-r--r-- | .hammerspoon/init.lua | 4 |
2 files changed, 27 insertions, 0 deletions
diff --git a/.hammerspoon/hyper.lua b/.hammerspoon/hyper.lua new file mode 100644 index 0000000..2124bca --- /dev/null +++ b/.hammerspoon/hyper.lua @@ -0,0 +1,23 @@ +local hyper = hs.hotkey.modal.new({}, nil) + +hyper.pressed = function() + hyper:enter() +end +hyper.released = function() + hyper:exit() +end + +-- Bind the Hyper key to the hammerspoon modal +hs.hotkey.bind({}, "F13", hyper.pressed, hyper.released) + +hyper.bindApp = function(mods, key, app) + local fn = function() + hs.application.launchOrFocus(app) + end + if type(app) == "function" then + fn = app + end + hyper:bind(mods, key, fn) +end + +return hyper diff --git a/.hammerspoon/init.lua b/.hammerspoon/init.lua new file mode 100644 index 0000000..547cef1 --- /dev/null +++ b/.hammerspoon/init.lua @@ -0,0 +1,4 @@ +local hyper = require("hyper") + +hyper.bindApp({}, "a", "Arc") +hyper.bindApp({}, "w", "Warp") |
