~andreafeletto/levee

a40cd1f35e815d58ac2b5bdf3968a611a8a0972e — Andrea Feletto 27 days ago 7e2284d
pulse: respect muted flag
1 files changed, 5 insertions(+), 1 deletions(-)

M src/modules/Pulse.zig
M src/modules/Pulse.zig => src/modules/Pulse.zig +5 -1
@@ 76,7 76,11 @@ fn getEvent(self_opaque: *anyopaque) !Event {
fn print(self_opaque: *anyopaque, writer: Module.StringWriter) !void {
    const self = utils.cast(Pulse)(self_opaque);

    return writer.print("🔊   {d}%", .{ self.volume });
    if (self.muted) {
        try writer.print("   🔇   ", .{});
    } else {
        try writer.print("🔊   {d}%", .{ self.volume });
    }
}

fn callbackIn(self_opaque: *anyopaque) error{Terminate}!void {