-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeymaps.lua
34 lines (27 loc) · 845 Bytes
/
keymaps.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Keymaps = {}
-- Command mappers --
Keymaps.CMD = { 'cmd' }
Keymaps.CMD_REV = { 'cmd', 'shift' }
Keymaps.LEADER_2 = { 'ctrl', 'alt', 'cmd' }
-- Commands --
hs.hotkey.bind(Keymaps.LEADER_2, 'R', function()
hs.reload()
end)
hs.alert.show('🔨 Hammerspoon reload')
-- Leader Commands
Keymaps.LEADER = hs.hotkey.modal.new('alt', 'o')
function Keymaps.LEADER:entered()
if hs.eventtap.isSecureInputEnabled() then
hs.alert('⚠️ Secure Input is on. Hyper Mode commands might not work.')
end
print('triggered leader mode')
end
function Keymaps.LEADER:exited()
print('exited from leader mode')
end
Keymaps.LEADER:bind('', 'escape', function()
Keymaps.LEADER:exit()
end)
Keymaps.LEADER:bind('alt', 'J', '🔗 google-chrome', ChromeWithProfile)
Keymaps.LEADER:bind('alt', 'K', '🔑 password-store', ChoosePassword)
return Keymaps