-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.lua
171 lines (160 loc) · 4.2 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
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
local actions = require("actions")
local M = {}
-- The default mode to return to
-- after we execute an action in other mode
-- (unless sticky mode is activated)
M.defaultMode = "tools"
-- Generate keybinds to switch modes
-- in every other mode
-- (you can configure this manually if you want)
M.generateModeKeybinds = true
-- Key to activate sticky mode
-- (Set to nil if you don't want sticky keys)
M.stickyKey = "<Alt>"
-- Help key (if used with another bind)
-- opens the help menu for specific keybinds
M.helpKey = "<Shift>"
-- Keybinds map
M.map = {
["tools"] = {
name = "Tools",
desc = "Switch between different tools",
buttons = { "r" },
commands = {
["pen"] = {
name = "Pen",
buttons = { "f" },
call = function() actions.setTool("pen") end
},
["eraser"] = {
name = "Eraser",
buttons = { "d" },
call = function() actions.setTool("eraser") end
},
["rect_sel"] = {
name = "Select (rectangle)",
buttons = { "s" },
call = function() actions.setTool("rect_sel") end
},
["reg_select"] = {
name = "Select (dynamic region)",
buttons = { "a" },
call = function() actions.setTool("reg_sel") end
},
},
},
["colors"] = {
name = "Colors",
description = "Switch between predefined colors (can be set in colors.lua)",
buttons = { "t" },
commands = {
["black"] = {
name = "Black",
buttons = { "f" },
call = function() actions.setColor("black") end
},
["blue"] = {
name = "Blue",
buttons = { "d" },
call = function() actions.setColor("blue") end
},
["green"] = {
name = "Green",
buttons = { "s" },
call = function() actions.setColor("green") end
},
["red"] = {
name = "Red",
buttons = { "a" },
call = function() actions.setColor("red") end
},
}
},
["size"] = {
name = "Size",
description = "Switch between different line widths",
buttons = { "e" },
commands = {
["0"] = {
name = "Very Fine",
buttons = { "a" },
call = function() actions.setLineWidth(0) end
},
["1"] = {
name = "Fine",
buttons = { "s" },
call = function() actions.setLineWidth(1) end
},
["2"] = {
name = "Medium",
buttons = { "d" },
call = function() actions.setLineWidth(2) end
},
["3"] = {
name = "Thick",
buttons = { "f" },
call = function() actions.setLineWidth(3) end
},
["4"] = {
name = "Very Thick",
buttons = { "g" },
call = function() actions.setLineWidth(4) end
},
},
},
["shapes"] = {
name = "Shapes",
description = "Switch between shapes to draw (rectangle, ellipse, arrow, etc.)",
buttons = { "w" },
commands = {
["plain"] = {
name = "Plain Shape",
buttons = { "f" },
call = function() actions.setShape("plain") end
},
["rect"] = {
name = "Rect Shape",
buttons = { "d" },
call = function() actions.setShape("rect") end
},
["ellipse"] = {
name = "Ellipse Shape",
buttons = { "s" },
call = function() actions.setShape("ellipse") end
},
["arrow"] = {
name = "Arrow Shape",
buttons = { "a" },
call = function() actions.setShape("arrow") end
},
},
},
["styles"] = {
name = "Styles",
description = "Switch between line styles (plain, dotted, atc.)",
buttons = { "q" },
commands = {
["plain"] = {
name = "Plain Style",
buttons = { "f" },
call = function() actions.setLineStyle("plain") end
},
["dash"] = {
name = "Dash Style",
buttons = { "d" },
call = function() actions.setLineStyle("dash") end
},
["dash_dot"] = {
name = "Dash-Dot Style",
buttons = { "s" },
call = function() actions.setLineStyle("dash_dot") end
},
["dot"] = {
name = "Dash-Dot Style",
buttons = { "a" },
call = function() actions.setLineStyle("dot") end
},
},
},
}
return M