forked from tstirrat/hammerspoon-config
-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.lua
101 lines (93 loc) · 2.54 KB
/
config.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
local config = {}
-- no animation of window moving, please
hs.window.animationDuration = 0
config.modules = {
"launcher",
"mgrid",
"arrangement",
"monitors",
"repl",
"reload",
"arrows",
"lock",
"fullscreen"
}
mash_keys = {"cmd", "ctrl"}
-- Maps monitor id -> screen index.
config.fullscreen = {
mash = mash_keys,
key = "Z"
}
-- Maps monitor id -> screen index.
config.monitors = {
autodiscover = true,
rows = 1
}
-- Launch applications
config.launcher = {
mash = mash_keys,
bindings = {
{ key = "T", application = "Terminal" },
{ key = "C", application = "Slack" },
{ key = "G", application = "Google Chrome" },
{ key = "E", application = "Logseq" },
{ key = "V", application = "MacVim" },
{ key = "X", application = "Todoist" },
{ key = "R", application = "Brave Browser" },
{ key = "M", application = "Microsoft Outlook" },
{ key = "W", application = "zoom.us" },
{ key = "S", command = "/Users/" .. os.getenv('USER') .. "/bin/excluded/blink1-tool --red" },
{ key = "D", command = "/Users/" .. os.getenv('USER') .. "/bin/excluded/blink1-tool --green" },
{ key = "F19", command = "/Users/" .. os.getenv('USER') .. "/bin/blink1-panic" }
}
}
-- Window arrangements.
config.arrangements = {
fuzzy_search = {
mash = {"cmd", "ctrl", "alt"},
key = "Z"
},
{
name = "zen",
alert = true,
mash = { "cmd", "ctrl", "alt" },
key = "A",
arrangement = {
{
app_title = "^Mail",
monitor = 1,
position = "full_screen",
},
{
app_title = "^Slack",
monitor = 4,
position = "left"
},
{
app_title = "^Messages",
monitor = 4,
position = function(d)
return d:translate_from('bottom_right', {
y = 42,
h = -40
})
end
},
{
app_title = "^ChronoMate",
monitor = 4,
position = function(d)
return d:translate_from('top_right', {
h = 42
})
end
},
{
app_title = "^Spotify",
monitor = 6,
position = "full_screen",
}
}
}
}
return config