From cf54af8d74cf0a8757506c2deb94947fd96c36e2 Mon Sep 17 00:00:00 2001 From: raziman Date: Mon, 15 Feb 2021 14:27:45 +0800 Subject: [PATCH] capitalize module --- anko/anko.go | 4 ++-- playlist.go | 4 ++-- queue.go | 4 ++-- start.go | 4 ++-- test/config | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/anko/anko.go b/anko/anko.go index 38a94d6..4997628 100644 --- a/anko/anko.go +++ b/anko/anko.go @@ -91,7 +91,7 @@ func (a *Anko) Execute(src string) (interface{}, error) { // KeybindExists checks if keybinding is defined. func (a *Anko) KeybindExists(panel string, keybind string) bool { - src := fmt.Sprintf("keybinds.%s.%s", panel, keybind) + src := fmt.Sprintf("Keybinds.%s.%s", panel, keybind) val, err := a.Execute(src) if err != nil { return false @@ -102,7 +102,7 @@ func (a *Anko) KeybindExists(panel string, keybind string) bool { // ExecKeybind executes function bounded by the keybinding. func (a *Anko) ExecKeybind(panel string, keybind string) error { - src := fmt.Sprintf("keybinds.%s.%s()", panel, keybind) + src := fmt.Sprintf("Keybinds.%s.%s()", panel, keybind) _, err := a.Execute(src) return err } diff --git a/playlist.go b/playlist.go index 7b9d765..28dfed7 100644 --- a/playlist.go +++ b/playlist.go @@ -149,9 +149,9 @@ func newPlaylist(args Args) *Playlist { kb := string(e.Rune()) - if gomu.anko.KeybindExists("playlist", kb) { + if gomu.anko.KeybindExists("Playlist", kb) { - err := gomu.anko.ExecKeybind("playlist", kb) + err := gomu.anko.ExecKeybind("Playlist", kb) if err != nil { errorPopup(err) } diff --git a/queue.go b/queue.go index 5c5741b..f3cb84b 100644 --- a/queue.go +++ b/queue.go @@ -372,9 +372,9 @@ func newQueue() *Queue { queue.SetInputCapture(func(e *tcell.EventKey) *tcell.EventKey { keybind := string(e.Rune()) - if gomu.anko.KeybindExists("queue", keybind) { + if gomu.anko.KeybindExists("Queue", keybind) { - err := gomu.anko.ExecKeybind("queue", keybind) + err := gomu.anko.ExecKeybind("Queue", keybind) if err != nil { errorPopup(err) } diff --git a/start.go b/start.go index 8dbfbc2..e623582 100644 --- a/start.go +++ b/start.go @@ -232,9 +232,9 @@ func start(application *tview.Application, args Args) { } kb := string(e.Rune()) - if gomu.anko.KeybindExists("global", kb) { + if gomu.anko.KeybindExists("Global", kb) { - err := gomu.anko.ExecKeybind("global", kb) + err := gomu.anko.ExecKeybind("Global", kb) if err != nil { errorPopup(err) } diff --git a/test/config b/test/config index 25b0ab8..12b2d8e 100644 --- a/test/config +++ b/test/config @@ -37,9 +37,9 @@ color_popup = "#0A0F14" -module keybinds { +module Keybinds { - module global { + module Global { b = func () { # execute shell function and capture stdout and stderr @@ -63,7 +63,7 @@ module keybinds { } - module playlist { + module Playlist { e = func() { val = 10 + 10 debug_popup(to_string(val)) @@ -76,7 +76,7 @@ module keybinds { } } - module queue { + module Queue { # override default loop keybinding o = toggle_loop }