-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathinit.lua
More file actions
30 lines (24 loc) · 666 Bytes
/
init.lua
File metadata and controls
30 lines (24 loc) · 666 Bytes
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
-- https://github.com/alacritty/alacritty/issues/862
--
-- c+space --> alacritty
hs.hotkey.bind({"ctrl"}, "space", function()
local alacritty = hs.application.get('ghostty')
if (alacritty ~= nil and alacritty:isFrontmost()) then
alacritty:hide()
else
hs.application.launchOrFocus("/Applications/Ghostty.app")
end
end)
-- reload this file
hs.hotkey.bind({"ctrl", "shift"}, "r", function()
hs.reload()
end)
-- numpad --> pcalc
hs.hotkey.bind({}, 'F16', function()
local app = hs.application.get('pcalc')
if (app ~= nil and app:isFrontmost()) then
app:hide()
else
hs.application.launchOrFocus("/Applications/PCalc.app")
end
end)