-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
158 lines (112 loc) · 3.97 KB
/
init.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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
hs.notify.show("Hammerspoon", "Starting Hammerspoon: ", hs.screen.mainScreen():name())
require("Helpers.Base")
require("Helpers.Util")
-- enable local patches
hs.window.filter = require("Helpers.Extensions.window_filter")
hs.alert = require("Helpers.Extensions.alert")
-- Note: Setup this hyper Key with Karabiner ELements
hyper = { "shift", "ctrl", "alt", "cmd" }
-- disable hotkey info
hs.hotkey.alertDuration = 0
require('Functions.Reload')
require("Functions.ConfigConsole")
require('Functions.SetupLuaRocks')
-- need to start after LuaRocks path setup
require('Functions.StartDebug')
require("Helpers.Extensions.String")
require("Helpers.Extensions.Table")
require("Helpers.Extensions.WindowFilterEvents")
require("Helpers.Extensions.WindowAxHotfix")
require("Helpers.Debug")
require("Helpers.DebugFunction")
require("Helpers.Enum")
require("Helpers.HotkeySilence")
require("Helpers.SendKeysOnlyInApp")
require("Helpers.HotkeyBindModal")
require("Helpers.HotkeyBindSafe")
hs.logger.defaultLogLevel = "info"
--hs.logger.defaultLogLevel = "verbose"
print("hs.logger.defaultLogLevel: " .. hs.logger.defaultLogLevel)
helper = {
table = require('Helpers.Table'),
window = require('Helpers.Window'),
}
hs.loadSpoon("EmmyLua")
hs.loadSpoon("hs_select_window")
require('Functions.ReloadWatcher')
require('Functions.AppBorders')
require('Functions.ChromeNewWindow')
-- i don't use Iina anymore
--require('Functions.ChromeTabToIina')
require('Functions.ChromeTabAudioActivate')
require('Functions.ChromeTabToNewWindow')
require('Functions.ChromeTabDomainCounter')
require('Functions.CheatSheet')
require('Functions.DateString')
require('Functions.HighLight')
require('Functions.PlayerGlobalControl')
require('Functions.MacZoom')
require('Functions.MailMateFocus')
require('Functions.DisableCmdW')
require('Functions.MaximizeApp')
require('Functions.Notifications')
require('Functions.ResizeChildWindows')
require('Functions.Umlauts')
require('Functions.Wifi')
require('Functions.WindowManager')
require('Functions.WindowPlacer')
require('Functions.FuzzyWindowSearch')
require('Functions.AudioSwitcher') -- hyper-6
require('Functions.Caffeine')
require('Functions.MultiDisplayBlack') -- heper-4 and hyper-5
require('Functions.KeyMapping')
require('Functions.MenuBarChooser')
--require('Functions.WindowTimer') -- cmd+ctrl+E
-- This shortcut can be changed
-- only for tests
--require('Functions.ContextMenu')
--require('Functions.Experimental')
-- Unused Scripts
-- require('Functions.PopupNotes') -- F3
-- require('Functions.Vimperator')
-- --> similar to pgrap and pkill
-- require('Functions.NetworkBar') -- show the current network speed
-- require('Functions.MemoryBar') -- show current used memory
-- require('Functions.NetworkDump') -- Dump all Wifi Events
-- Test Spoons :)
--hs.loadSpoon("DrawRect")
--hs.window.highlight.ui.isolateColor = {0.1, 0.1, 0.1, 0.85}
--hs.window.highlight.start()
--local highlight = require "hs.window.highlight"
--highlight.ui.overlay = true
--highlight.ui.overlayColor = {0, 0, 0, 0}
--highlight.ui.isolateColor = {0.1, 0.1, 0.1, 0.85}
-- highlight.ui.windowShownFlashColor = {1, 0.6, 0, 0.5}
-- highlight.ui.flashDuration = 0.3
-- highlight.ui.frameWidth = 10
-- highlight.ui.frameColor = {1, 0.6, 0, 0.5}
--highlight.start()
--highlight.toggleIsolate()
--local tabs = require "hs.tabs"
--hs.tabs.enableForApp("com.google.Chrome")
function karabinerCallback(eventName, params)
print("Event: "..eventName)
print(hs.inspect(params))
end
hs.urlevent.bind("karabiner", karabinerCallback)
-- Setup Complete
hs.loadSpoon('FadeLogo'):start()
--hs.spoons.use('SDCPasteboard', {
-- hotkeys = {
-- toggleChooser = {hyper, 'V'}
-- },
-- start = true
--})
-- Disable window animation = 0
-- normal is = 0.3
function sleep()
--hs.caffeinate.systemSleep()
testTimer = hs.timer.doAfter(2, function() hs.caffeinate.systemSleep() end)
end
hs.hotkey.bind({"shift", "alt", "command"}, "DELETE", keyInfo("goto sleep"), sleep)
hs.window.animationDuration = 0.1