-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
23 lines (21 loc) · 821 Bytes
/
init.lua
File metadata and controls
23 lines (21 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- automatically reload config after save
function reloadConfig(files)
doReload = false
for _,file in pairs(files) do
if file:sub(-4) == ".lua" then
doReload = true
end
end
if doReload then
hs.reload()
end
end
myWatcher = hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", reloadConfig):start()
hs.alert.show("Config loaded")
-- Set up hotkey combinations
local hyper = {"ctrl", "shift", "alt", "cmd"}
-- start applications
hs.hotkey.bind(hyper, 'b', function() hs.application.launchOrFocus("firefox") end)
hs.hotkey.bind(hyper, 't', function() hs.application.launchOrFocus("Microsoft Teams") end)
hs.hotkey.bind(hyper, 'z', function() hs.application.launchOrFocus("zoom.us") end)
hs.hotkey.bind(hyper, 'v', function() hs.application.launchOrFocus('Visual Studio Code') end)