goon

goon

https://git.tonybtw.com/goon.git git://git.tonybtw.com/goon.git
663 bytes raw
1
// Arrow functions as config templates
2
3
// Simple template
4
let color = (hex) => { hex = hex; };
5
6
// Multi-parameter template
7
let keybind = (mods, key, cmd) => {
8
    mods = mods;
9
    key = key;
10
    cmd = cmd;
11
};
12
13
// Nested template
14
let workspace_key = (n) => keybind("super", n, "workspace ${n}");
15
16
{
17
    colors = {
18
        red = color("#ff0000");
19
        green = color("#00ff00");
20
        blue = color("#0000ff");
21
    };
22
23
    keys = [
24
        keybind("super", "return", "terminal"),
25
        keybind("super", "d", "launcher"),
26
        keybind(["super", "shift"], "q", "kill"),
27
        workspace_key(1),
28
        workspace_key(2),
29
        workspace_key(3),
30
    ];
31
}