-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
77 lines (63 loc) · 1.94 KB
/
Copy pathinit.lua
File metadata and controls
77 lines (63 loc) · 1.94 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---init
alert = require 'hs.alert'
buf = {}
log = hs.logger.new('main', 'info')
HYPER = { "cmd", "alt", "ctrl", "shift" }
col = hs.drawing.color.x11
wm=hs.webview.windowMasks
hs.loadSpoon("SpoonInstall")
spoon.SpoonInstall.use_syncinstall = true
Install=spoon.SpoonInstall
Install:andUse("Keychain")
function loadKeychainPasswordByComment(comment)
local item = spoon.Keychain:getItem{comment = comment }
return item.password
end
function loadKeychainPasswordByAccount(account)
local item = spoon.Keychain:getItem{account = account }
return item.password
end
-- log debug info to Hyperspoon Console
-- We can disable all logging in one place
function debuglog(text)
hs.console.printStyledtext("DEBUG: "..tostring(text))
end
---- Auto-reload config file. Called whenever a *.lua in the directory changes
--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
---- Alert "Config loaded" here, happens not as we call reload, but as we load. Default alert durration=2 sec.
--hs.alert.show("Config loaded")
--
--local myWatcher = hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", reloadConfig):start()
--local myWatcher = hs.pathwatcher.new(os.getenv("HOME") .. "/dev/git/hammerspoon/", reloadConfig):start()
if hs.wasLoaded == nil then
hs.wasLoaded = true
table.insert(buf, "Hammerspoon loaded.")
else
table.insert(buf, "Hammerspoon re-loaded. ")
end
alert.show(table.concat(buf))
---init
require 'hyper-bindings'
require 'web-mode-binder'
require 'teams-toggle-mute'
require 'window-management'
require 'keyboard-layout-switcher'
require 'vpn'
require 'translation-popup'
require 'hold-to-quit'
require 'text-manipulation'
require 'mouse-finder'
require 'audio-watcher'
require 'wifi-watcher'
require 'rounded-corners'
--require 'keypress-show'