src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

commit 64f31a7b7a65a226217bc042c9afd992615d9c62
parent 860b8909d4d7d615d5d86ec5c6e8eb8fe2d85cf0
Author: dwrz <dwrz@dwrz.net>
Date:   Sun,  9 Nov 2025 18:41:36 +0000

Fix statusbar icons

Diffstat:
Mpkg/statusbar/eth/eth.go | 10+++++-----
Mpkg/statusbar/memory/memory.go | 2+-
Mpkg/statusbar/volume/volume.go | 4++--
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/pkg/statusbar/eth/eth.go b/pkg/statusbar/eth/eth.go @@ -26,7 +26,7 @@ func (b *Block) Render(ctx context.Context) (string, error) { iface, err := net.InterfaceByName(b.iface) if err != nil { if err.Error() == "route ip+net: no such network interface" { - return " ", nil + return " ", nil } return "", fmt.Errorf( "failed to get interface %s: %v", b.iface, err, @@ -51,13 +51,13 @@ func (b *Block) Render(ctx context.Context) (string, error) { switch { case ip4 == "" && ip6 == "": - return " ", nil + return " ", nil case ip4 != "" && ip6 == "": - return fmt.Sprintf(" %s", ip4), nil + return fmt.Sprintf(" %s", ip4), nil case ip4 == "" && ip6 != "": - return fmt.Sprintf(" %s", ip6), nil + return fmt.Sprintf(" %s", ip6), nil default: - return fmt.Sprintf(" %s %s", ip4, ip6), nil + return fmt.Sprintf(" %s %s", ip4, ip6), nil } } diff --git a/pkg/statusbar/memory/memory.go b/pkg/statusbar/memory/memory.go @@ -51,7 +51,7 @@ func (b *Block) Render(ctx context.Context) (string, error) { ) } - fmt.Fprintf(&output, " %.0f%% ", (used/total)*100) + fmt.Fprintf(&output, " %.0f%% ", (used/total)*100) case "Swap:": total, err := strconv.ParseFloat(fields[1], 64) if err != nil { diff --git a/pkg/statusbar/volume/volume.go b/pkg/statusbar/volume/volume.go @@ -26,7 +26,7 @@ func (b *Block) Render(ctx context.Context) (string, error) { } if strings.Contains(string(out), "yes") { - return fmt.Sprintf(""), nil + return "", nil } out, err = exec.Command( @@ -37,7 +37,7 @@ func (b *Block) Render(ctx context.Context) (string, error) { } if fields := strings.Fields(string(out)); len(fields) < 5 { - return fmt.Sprintf(" "), nil + return " ", nil } else { return fmt.Sprintf(" %s", fields[4]), nil }