goon

goon

https://git.tonybtw.com/goon.git git://git.tonybtw.com/goon.git
1,463 bytes raw
1
// Full window manager config showcasing all goon features
2
3
// Templates
4
let key = (mods, key, cmd) => { mods = mods; key = key; cmd = cmd; };
5
let ws_key = (n) => key("super", n, "workspace ${n}");
6
let ws_move = (n) => key(["super", "shift"], n, "move-to-workspace ${n}");
7
8
// Theme
9
let colors = {
10
    bg = "#1a1a2e";
11
    fg = "#eaeaea";
12
    accent = "#e94560";
13
    border_focus = "#e94560";
14
    border_normal = "#333333";
15
};
16
17
// Layout defaults
18
let defaults = {
19
    gap = 10;
20
    border_width = 2;
21
    smart_gaps = true;
22
};
23
24
// Apps
25
let terminal = "alacritty";
26
let launcher = "rofi -show drun";
27
let browser = "firefox";
28
29
{
30
    // Spread defaults and override
31
    ...defaults;
32
    gap = 8;
33
34
    colors = colors;
35
36
    keybinds = [
37
        // App launchers
38
        key("super", "return", terminal),
39
        key("super", "d", launcher),
40
        key("super", "b", browser),
41
42
        // Window management
43
        key("super", "q", "kill"),
44
        key("super", "f", "fullscreen"),
45
        key("super", "space", "float"),
46
47
        // Workspace switching (1-9)
48
        ...map([1..9], ws_key),
49
50
        // Move to workspace (1-9)
51
        ...map([1..9], ws_move),
52
    ];
53
54
    workspaces = map([1..9], (n) => {
55
        id = n;
56
        name = if n then "workspace ${n}" else "default";
57
    });
58
59
    rules = [
60
        { class = "Firefox"; workspace = 2; },
61
        { class = "Spotify"; workspace = 9; floating = true; },
62
        { class = "Steam"; workspace = 8; },
63
    ];
64
}