missing percent on reset

This commit is contained in:
2023-04-14 23:07:27 +02:00
parent 25f89c076f
commit 3a97d96d82

View File

@@ -24,7 +24,7 @@ var (
const ( const (
CritColor = "ff5050" CritColor = "ff5050"
WarnColor = "ffbf00" WarnColor = "ffbf00"
ResetColor = "{F-}" ResetColor = "%{F-}"
) )
type WaybarOut struct { type WaybarOut struct {
@@ -57,7 +57,7 @@ func formatLine(stats *probing.Statistics) {
packetColor = fmt.Sprintf("%%{F#%s}", CritColor) packetColor = fmt.Sprintf("%%{F#%s}", CritColor)
} }
fmt.Printf("%s\uE4E2 %dms %%%s\uF1B2 %d%%\n", rttColor, stats.AvgRtt.Milliseconds(), packetColor, int(math.Round(stats.PacketLoss))) fmt.Printf("%s\uE4E2 %dms %s\uF1B2 %d%%\n", rttColor, stats.AvgRtt.Milliseconds(), packetColor, int(math.Round(stats.PacketLoss)))
} }
func formatLineWaybar(stats *probing.Statistics) { func formatLineWaybar(stats *probing.Statistics) {