~andreafeletto/levee

ref: 687c1d16212671656bb79436df39feb6275e00a3 levee/src/config.zig -rw-r--r-- 887 bytes
687c1d16Andrea Feletto add case for battery capacity computation 8 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");

pub const Config = struct {
    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",
        };
    }
};