diff --git a/README.md b/README.md index 9cfc161..a70cfb3 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ Key|Action 7|Sort table by *[7] day change* a|Sort table by *[a]vailable supply* c|Show currency convert menu -f|Toggle show favorites +f|Toggle coin as favorite F|Toggle show favorites g|Go to first line of page (vim inspired) G|Go to last line of page (vim inspired) @@ -246,7 +246,7 @@ You can then configure the actions you want for each key: end = "move_to_page_last_row" enter = "toggle_row_chart" esc = "quit" - f = "toggle_show_favorites" + f = "toggle_favorite" F = "toggle_show_favorites" F1 = "help" g = "move_to_page_first_row" @@ -365,11 +365,11 @@ Action|Description - Q: How do I add/remove a favorite? - - A: Press the space key to toggle a coin as a favorite. + - A: Press the f key to toggle a coin as a favorite. - Q: How do I view all my favorites? - - A: Press f to toggle view all your favorites. + - A: Press F (shift+f) to toggle view all your favorites. - Q: How do I save my favorites? diff --git a/cointop/conversion.go b/cointop/conversion.go index d7b39ab..b057391 100644 --- a/cointop/conversion.go +++ b/cointop/conversion.go @@ -89,7 +89,16 @@ func (ct *Cointop) updateConvertMenu() { if cnt%percol == 0 { cnt = 0 } - item := fmt.Sprintf(" [ %1s ] %4s %-34s", string(alphanumericcharacters[i]), key, color.Yellow(currency)) + shortcut := string(alphanumericcharacters[i]) + if key == ct.currencyconversion { + shortcut = color.YellowBold("*") + key = color.WhiteBold(key) + currency = color.YellowBold(currency) + } else { + key = color.White(key) + currency = color.Yellow(currency) + } + item := fmt.Sprintf(" [ %1s ] %4s %-34s", shortcut, key, currency) cols[cnt] = append(cols[cnt], item) cnt = cnt + 1 } diff --git a/cointop/shortcuts.go b/cointop/shortcuts.go index 6017dc7..cf5911d 100644 --- a/cointop/shortcuts.go +++ b/cointop/shortcuts.go @@ -14,12 +14,15 @@ func defaultShortcuts() map[string]string { "esc": "quit_view", "space": "toggle_favorite", "ctrl+c": "quit", + "ctrl+C": "quit", "ctrl+d": "page_down", "ctrl+f": "open_search", "ctrl+n": "next_page", "ctrl+p": "previous_page", "ctrl+r": "refresh", + "ctrl+R": "refresh", "ctrl+s": "save", + "ctrl+S": "save", "ctrl+u": "page_up", "alt+up": "sort_column_asc", "alt+down": "sort_column_desc", @@ -34,7 +37,7 @@ func defaultShortcuts() map[string]string { "a": "sort_column_available_supply", "c": "show_currency_convert_menu", "C": "show_currency_convert_menu", - "f": "toggle_show_favorites", + "f": "toggle_favorite", "F": "toggle_show_favorites", "g": "move_to_page_first_row", "G": "move_to_page_last_row", diff --git a/cointop/statusbar.go b/cointop/statusbar.go index ad7a02f..2594f72 100644 --- a/cointop/statusbar.go +++ b/cointop/statusbar.go @@ -11,7 +11,7 @@ func (ct *Cointop) updateStatusbar(s string) { ct.statusbarview.Clear() currpage := ct.currentDisplayPage() totalpages := ct.totalPages() - base := fmt.Sprintf("%sQuit %sHelp %sChart %sRange %sSearch %sConvert", "[Q]", "[?]", "[Enter]", "[[ ]]", "[/]", "[C]") + base := fmt.Sprintf("%sQuit %sHelp %sChart %sRange %sSearch %sConvert %sFavorite %sSave", "[Q]", "[?]", "[Enter]", "[[ ]]", "[/]", "[C]", "[F]", "[CTRL-S]") fmt.Fprintln(ct.statusbarview, pad.Right(fmt.Sprintf("%v %sPage %v/%v %s", base, "[← →]", currpage, totalpages, s), ct.maxtablewidth, " ")) }) } diff --git a/pkg/color/color.go b/pkg/color/color.go index 12e8912..40ddbfe 100644 --- a/pkg/color/color.go +++ b/pkg/color/color.go @@ -13,6 +13,8 @@ var ( WhiteBold = color.New(color.FgWhite, color.Bold).SprintFunc() // Yellow color Yellow = color.New(color.FgYellow).SprintFunc() + // YellowBold color + YellowBold = color.New(color.FgYellow, color.Bold).SprintFunc() // YellowBg color YellowBg = color.New(color.BgYellow, color.FgBlack).SprintFunc() // Green color