From dea43e939d1ea0e5ad8a73de060e4ec1ab10f7e5 Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Sat, 28 Apr 2018 13:23:55 -0700 Subject: [PATCH] fix esc --- README.md | 8 +++++++- cointop/cointop.go | 3 +++ cointop/shortcuts.go | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 35edae7..2f6ba7f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The interface is inspired by [`htop`](https://en.wikipedia.org/wiki/Htop) and sh -Yes, it's fast. +In action @@ -136,6 +136,7 @@ Key|Action Space|Toggle coin as favorite Ctrl+c|Alias to quit Ctrl+d|Jump page down (vim inspired) +Ctrl+f|Search Ctrl+n|Go to next page Ctrl+p|Go to previous page Ctrl+r|Force refresh data @@ -214,6 +215,7 @@ You can then configure the actions you want for each key: c = "toggle_row_chart" "ctrl+c" = "quit" "ctrl+d" = "page_down" + "ctrl+f" = "open_search" "ctrl+n" = "next_page" "ctrl+p" = "previous_page" "ctrl+r" = "refresh" @@ -363,6 +365,10 @@ Action|Description - A: Try setting the environment variable `TERM=screen-256color` +- Q: Does cointop work inside an emacs shell? + + - A: Yes, but it's slightly buggy. + ## Development ### Snap diff --git a/cointop/cointop.go b/cointop/cointop.go index 23b12d2..561be0b 100644 --- a/cointop/cointop.go +++ b/cointop/cointop.go @@ -113,6 +113,9 @@ func Run() { } ct.g = g defer g.Close() + g.InputEsc = true + g.BgColor = gocui.ColorBlack + g.FgColor = gocui.ColorWhite g.Mouse = true g.Highlight = true g.SetManagerFunc(ct.layout) diff --git a/cointop/shortcuts.go b/cointop/shortcuts.go index dfa5b7d..444fa26 100644 --- a/cointop/shortcuts.go +++ b/cointop/shortcuts.go @@ -15,6 +15,7 @@ func defaultShortcuts() map[string]string { "space": "toggle_favorite", "ctrl+c": "quit", "ctrl+d": "page_down", + "ctrl+f": "open_search", "ctrl+n": "next_page", "ctrl+p": "previous_page", "ctrl+r": "refresh",