From 8a0a15edda5e2b350652948700af73091e351c1e Mon Sep 17 00:00:00 2001 From: namedkitten Date: Fri, 10 Jul 2020 20:07:25 +0100 Subject: [PATCH] Update some values. --- src/widgets/battery/battery.zig | 4 ++-- src/widgets/weather/weather.zig | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/widgets/battery/battery.zig b/src/widgets/battery/battery.zig index ea2c5bb..bd673ab 100644 --- a/src/widgets/battery/battery.zig +++ b/src/widgets/battery/battery.zig @@ -110,9 +110,9 @@ pub const BatteryWidget = struct { if (capacity > 80) { power_colour = "green"; - } else if (capacity > 60) { + } else if (capacity > 70) { power_colour = "yellow"; - } else if (capacity > 40) { + } else if (capacity > 30) { power_colour = "orange"; } else { power_colour = "red"; diff --git a/src/widgets/weather/weather.zig b/src/widgets/weather/weather.zig index d2737a1..2520e43 100644 --- a/src/widgets/weather/weather.zig +++ b/src/widgets/weather/weather.zig @@ -169,11 +169,14 @@ pub const WeatherWidget = struct { var tempColour: []const u8 = "green"; if (temp >= 20) { tempColour = "red"; - } else if (temp == 19) { + } else if (temp >= 16) { tempColour = "orange"; - } else if (temp == 18) { + } else if (temp >= 12) { tempColour = "yellow"; + } else { + tempColour = "green"; } + var i = Info{ .name = self.name, .full_text = try std.fmt.allocPrint(arenacator, "{} {}{}{} {}", .{