-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloadConfig.lua
46 lines (42 loc) · 1.08 KB
/
loadConfig.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
35
36
37
38
39
40
41
42
43
44
45
46
-- custom_config = hs.fs.pathToAbsolute(os.getenv("HOME") .. '/.config/hammerspoon/private/config.lua')
hs.loadSpoon("ModalMgr")
-- Define default Spoons which will be loaded later
if not hspoon_list then
hspoon_list = {
"AClock",
-- "BingDaily",
-- "CircleClock",
-- "HSKeybindings",
-- "SpoonInstall",
"ClipShow",
"ClipboardTool",
-- "CountDown",
-- "HCalendar",
-- "HSaria2",
-- "HSearch",
"Layouts",
-- "SpeedMenu",
-- "WinWin",
-- "FnMate",
}
end
-- Load Spoons
for _, v in pairs(hspoon_list) do
hs.loadSpoon(v)
end
-- Function to check if a value exists in a list
local function isInList(value, list)
for _, v in ipairs(list) do
if v == value then
return true
end
end
return false
end
-- Check if ClipboardTool is in the hspoon_list and start it
if isInList("ClipboardTool", hspoon_list) then
spoon.ClipboardTool:start()
hs.alert.show("ClipboardTool loaded")
else
hs.alert.show("ClipboardTool not loaded")
end