-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.lua
65 lines (52 loc) · 1.27 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
-- luacheck: read_globals hs, globals kit vhs
hs.autoLaunch(true)
hs.consoleOnTop(true)
hs.dockIcon(false)
hs.menuIcon(false)
kit, vhs = require 'kit', require 'vhs'
local alpha = 0.95
hs.console.alpha(alpha)
hs.console.behaviorAsLabels { 'moveToActiveSpace' }
hs.window.animationDuration = 0
local hyper = { 'ctrl', 'alt', 'cmd' }
-- vhs
vhs {
cheatsheet = {
content = {
mods = {
order = { 'shift', 'ctrl', 'alt', 'cmd' },
},
},
view = {
alpha = alpha,
cache = hs.timer.hours(1),
},
},
dock_press = {
modifier = { 'ctrl' },
},
ensure = {
message = 'Really?',
},
layout_cache = {},
things = {},
}
kit.each(vhs.ensure.bindSpec, ipairs {
{ { 'cmd' }, 'q' },
{ { 'cmd', 'alt' }, 'q' },
{ { 'cmd', 'shift' }, 'w' },
})
kit.eachkv(hs.hotkey.bindSpec, pairs {
[{ hyper, 'space' }] = hs.toggleConsole,
[{ hyper, '/' }] = vhs.cheatsheet.show,
[{ hyper, 'v' }] = vhs.things.force_paste,
})
-- spoon
hs.loadSpoon 'MiroWindowsManager'
spoon.MiroWindowsManager:bindHotkeys {
up = { hyper, 'up' },
right = { hyper, 'right' },
down = { hyper, 'down' },
left = { hyper, 'left' },
fullscreen = { hyper, 'return' },
}