mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Additional data into documentation
This commit is contained in:
@@ -11,6 +11,17 @@ import (
|
||||
// Config is a pointer to the global config object
|
||||
var Config *config.Config
|
||||
|
||||
const helpText = `
|
||||
Keyboard commands for Git:
|
||||
|
||||
/: Show/hide this help window
|
||||
h: Previous weather location
|
||||
l: Next weather location
|
||||
|
||||
arrow left: Previous weather location
|
||||
arrow right: Next weather location
|
||||
`
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
|
||||
@@ -87,6 +98,15 @@ func (widget *Widget) gitRepos(repoPaths []string) []*GitRepo {
|
||||
}
|
||||
|
||||
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
switch string(event.Rune()) {
|
||||
case "h":
|
||||
widget.Prev()
|
||||
return nil
|
||||
case "l":
|
||||
widget.Next()
|
||||
return nil
|
||||
}
|
||||
|
||||
switch event.Key() {
|
||||
case tcell.KeyLeft:
|
||||
widget.Prev()
|
||||
|
||||
Reference in New Issue
Block a user