From effbc9a70ae2cf94b6e47dae9271fac3e993cfef Mon Sep 17 00:00:00 2001 From: jon4hz Date: Sun, 24 Jul 2022 21:37:23 +0200 Subject: [PATCH] fix: use config values --- internal/pipe/hostname/hostname.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/pipe/hostname/hostname.go b/internal/pipe/hostname/hostname.go index eb66ded..eeeb2d6 100644 --- a/internal/pipe/hostname/hostname.go +++ b/internal/pipe/hostname/hostname.go @@ -49,11 +49,11 @@ func (Pipe) Message(c *context.Context) string { } } - f, err = figletlib.GetFontByName(c.Config.Hostname.FigletFontDir, "standard") + f, err = figletlib.GetFontByName(c.Config.Hostname.FigletFontDir, c.Config.Hostname.FigletFont) if err != nil { return "" } - renderStr := figletlib.SprintMsg(hostname, f, 80, f.Settings(), "left") + renderStr := figletlib.SprintMsg(hostname, f, c.Width, f.Settings(), "left") colors := func() string { colors := colorGrid(lipgloss.Width(renderStr), lipgloss.Height(renderStr))