mirror of
https://github.com/taigrr/wtf
synced 2026-03-22 19:22:18 -07:00
WTF-400 CmdRunner extracted to new config format
This commit is contained in:
@@ -12,17 +12,19 @@ import (
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
|
||||
args []string
|
||||
cmd string
|
||||
result string
|
||||
args []string
|
||||
cmd string
|
||||
result string
|
||||
settings *Settings
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application) *Widget {
|
||||
func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(app, "CmdRunner", "cmdrunner", false),
|
||||
|
||||
args: wtf.ToStrs(wtf.Config.UList("wtf.mods.cmdrunner.args")),
|
||||
cmd: wtf.Config.UString("wtf.mods.cmdrunner.cmd"),
|
||||
args: settings.args,
|
||||
cmd: settings.cmd,
|
||||
settings: settings,
|
||||
}
|
||||
|
||||
widget.View.SetWrap(true)
|
||||
|
||||
Reference in New Issue
Block a user