From 154cb3ea4f7ace5f36042abd41b7c009ce9a2d02 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Wed, 13 Jun 2018 15:41:01 -0700 Subject: [PATCH] Close #205. cmdrunner will now respect title attribute --- cmdrunner/widget.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmdrunner/widget.go b/cmdrunner/widget.go index 0708527e..c1460a16 100644 --- a/cmdrunner/widget.go +++ b/cmdrunner/widget.go @@ -36,14 +36,16 @@ func NewWidget() *Widget { func (widget *Widget) Refresh() { widget.UpdateRefreshedAt() widget.execute() - widget.View.SetTitle(fmt.Sprintf(" %s ", widget)) + + title := Config.UString("wtf.mods.cmdrunner.title", widget.String()) + widget.View.SetTitle(fmt.Sprintf("%s", title)) widget.View.SetText(fmt.Sprintf("%s", widget.result)) } func (widget *Widget) String() string { args := strings.Join(widget.args, " ") - return fmt.Sprintf("%s %s", widget.cmd, args) + return fmt.Sprintf(" %s %s ", widget.cmd, args) } func (widget *Widget) execute() {