srctree

Gregory Mullen parent f14f43d3 32d6b7db
update to new zig and smaller light step

build.zig added: 6, removed: 6, total 0
@@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void {
 
const exe = b.addExecutable(.{
.name = "zwaybar",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
@@ -20,7 +20,7 @@ pub fn build(b: *std.Build) void {
run_step.dependOn(&run_cmd.step);
 
const unit_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
 
src/video.zig added: 6, removed: 6, total 0
@@ -59,9 +59,9 @@ pub const Backlight = struct {
 
pub fn click(self: *Backlight, clk: Click) !void {
if (clk.button == 4) {
try self.change(4);
try self.change(if (self.current < 16) 1 else 4);
} else if (clk.button == 5) {
try self.change(-4);
try self.change(if (self.current < 16) -1 else -4);
} else return;
}