mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add character identifiers to focusable widgets
When no widget has focus, press the letter key to focus on the widget
assigned to that letter.
Example:
GitHub (d)
Press "d" to focus on the GitHub widget.
This commit is contained in:
@@ -31,7 +31,7 @@ type Widget struct {
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(" Text File ", "textfile", true),
|
||||
TextWidget: wtf.NewTextWidget("TextFile", "textfile", true),
|
||||
|
||||
app: app,
|
||||
filePath: wtf.Config.UString("wtf.mods.textfile.filePath"),
|
||||
@@ -50,7 +50,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
widget.UpdateRefreshedAt()
|
||||
widget.View.SetTitle(fmt.Sprintf(" %s ", widget.fileName()))
|
||||
widget.View.SetTitle(widget.ContextualTitle(widget.fileName()))
|
||||
|
||||
filePath, _ := wtf.ExpandHomeDir(widget.filePath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user