diff --git a/internal/ui/menu.go b/internal/ui/menu.go index e212e09b..b09a3c4a 100644 --- a/internal/ui/menu.go +++ b/internal/ui/menu.go @@ -257,7 +257,6 @@ func initKeys() { initNumbKeys() initStdKeys() initShiftKeys() - initCtrlKeys() } func initNumbKeys() { diff --git a/internal/views/alias.go b/internal/views/alias.go index 584ef7be..a083574e 100644 --- a/internal/views/alias.go +++ b/internal/views/alias.go @@ -13,7 +13,7 @@ import ( const ( aliasTitle = "Aliases" - aliasTitleFmt = " [aqua::b]%s([fuchsia::b]%d[fuchsia::-][aqua::-]) " + aliasTitleFmt = " [mediumseagreen::b]%s([fuchsia::b]%d[fuchsia::-][mediumseagreen::-]) " ) type aliasView struct { @@ -29,8 +29,8 @@ func newAliasView(app *appView, current ui.Igniter) *aliasView { tableView: newTableView(app, aliasTitle), app: app, } - v.SetBorderFocusColor(tcell.ColorFuchsia) - v.SetSelectedStyle(tcell.ColorWhite, tcell.ColorFuchsia, tcell.AttrNone) + v.SetBorderFocusColor(tcell.ColorMediumSpringGreen) + v.SetSelectedStyle(tcell.ColorWhite, tcell.ColorMediumSpringGreen, tcell.AttrNone) v.SetColorerFn(aliasColorer) v.current = current v.SetActiveNS("") diff --git a/internal/views/colorer.go b/internal/views/colorer.go index 53b940db..312b2644 100644 --- a/internal/views/colorer.go +++ b/internal/views/colorer.go @@ -29,7 +29,7 @@ func benchColorer(ns string, r *resource.RowEvent) tcell.Color { } func aliasColorer(string, *resource.RowEvent) tcell.Color { - return tcell.ColorFuchsia + return tcell.ColorMediumSpringGreen } func rbacColorer(ns string, r *resource.RowEvent) tcell.Color { diff --git a/internal/views/resource.go b/internal/views/resource.go index 3417e6b3..d962bf04 100644 --- a/internal/views/resource.go +++ b/internal/views/resource.go @@ -456,9 +456,29 @@ func (v *resourceView) execCmd(bin string, bg bool, args ...string) ui.ActionHan func (v *resourceView) defaultK9sEnv() K9sEnv { ns, n := namespaced(v.masterPage().GetSelectedItem()) + ctx, err := v.app.Conn().Config().CurrentContextName() + if err != nil { + ctx = "n/a" + } + cluster, err := v.app.Conn().Config().CurrentClusterName() + if err != nil { + cluster = "n/a" + } + user, err := v.app.Conn().Config().CurrentUserName() + if err != nil { + user = "n/a" + } + groups, err := v.app.Conn().Config().CurrentGroupNames() + if err != nil { + groups = []string{"n/a"} + } env := K9sEnv{ "NAMESPACE": ns, "NAME": n, + "CONTEXT": ctx, + "CLUSTER": cluster, + "USER": user, + "GROUPS": strings.Join(groups, ","), } row := v.masterPage().GetRow() for i, r := range row {