~andreafeletto/levee

ref: f2b74950b7431f6024814ff54cbc0949e29e9a5d levee/src/Config.zig -rw-r--r-- 773 bytes
f2b74950Andrea Feletto add args for help and modules 5 months ago
                                                                                
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
const fcft = @import("fcft");
const pixman = @import("pixman");

const Config = @This();

height: u16,
backgroundColor: pixman.Color,
foregroundColor: pixman.Color,
border: u15,
font: *fcft.Font,
clockFormat: [*:0]const u8,

pub fn init() !Config {
    var font_names = [_][*:0]const u8{"monospace:size=14"};

    return Config{
        .height = 32,
        .backgroundColor = .{
            .red = 0,
            .green = 0,
            .blue = 0,
            .alpha = 0xffff,
        },
        .foregroundColor = .{
            .red = 0xffff,
            .green = 0xffff,
            .blue = 0xffff,
            .alpha = 0xffff,
        },
        .border = 2,
        .font = try fcft.Font.fromName(&font_names, null),
        .clockFormat = "%d %b %Y - %R",
    };
}