mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
WTF-400 Fix title display in CmdRunner
This commit is contained in:
parent
03e186a0cc
commit
a8e3602817
@ -84,7 +84,7 @@ func NewCommonSettingsFromYAML(name, configKey string, ymlConfig *config.Config)
|
||||
Enabled: ymlConfig.UBool(modulePath+".enabled", false),
|
||||
FocusChar: ymlConfig.UInt(modulePath+".focusChar", -1),
|
||||
RefreshInterval: ymlConfig.UInt(modulePath+".refreshInterval", 300),
|
||||
Title: ymlConfig.UString(modulePath+".title", name),
|
||||
Title: ymlConfig.UString(modulePath+".title", ""),
|
||||
}
|
||||
|
||||
return &common
|
||||
|
@ -35,8 +35,12 @@ func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
||||
func (widget *Widget) Refresh() {
|
||||
widget.execute()
|
||||
|
||||
title := tview.TranslateANSI(wtf.Config.UString("wtf.mods.cmdrunner.title", widget.String()))
|
||||
widget.View.SetTitle(title)
|
||||
title := widget.settings.common.Title
|
||||
if title == "" {
|
||||
title = widget.String()
|
||||
}
|
||||
|
||||
widget.View.SetTitle(tview.TranslateANSI(title))
|
||||
|
||||
widget.View.SetText(widget.result)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user