Skip to content

Commit

Permalink
Make kube indicator configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
betaboon committed Dec 21, 2024
1 parent d1e9baa commit 7dca1fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ var defaults = Config{
RepoConflicted: "\u273C",
RepoStashed: "\u2691",

KubeIndicator: "\u2388",
NixShellIndicator: "\uF313",
NodeIndicator: "\u2B22",
RvmIndicator: "\uE92B",
Expand All @@ -107,6 +108,7 @@ var defaults = Config{
RepoConflicted: "\u273C",
RepoStashed: "\u2691",

KubeIndicator: "\u2388",
NixShellIndicator: "\uF313",
NodeIndicator: "\u2B22",
RvmIndicator: "\uE92B",
Expand All @@ -122,6 +124,7 @@ var defaults = Config{
RepoConflicted: "\u273C",
RepoStashed: "\u2691",

KubeIndicator: "\u2388",
NixShellIndicator: "\uF313",
NodeIndicator: "\u2B22",
RvmIndicator: "\uE92B",
Expand Down
5 changes: 2 additions & 3 deletions segment-kube.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"fmt"
pwl "github.com/justjanne/powerline-go/powerline"
"io/ioutil"
"os"
Expand Down Expand Up @@ -113,7 +112,7 @@ func segmentKube(p *powerline) []pwl.Segment {
kubeIconHasBeenDrawnYet = true
segments = append(segments, pwl.Segment{
Name: "kube-cluster",
Content: fmt.Sprintf("⎈ %s", cluster),
Content: p.symbols.KubeIndicator + " " + cluster,
Foreground: p.theme.KubeClusterFg,
Background: p.theme.KubeClusterBg,
})
Expand All @@ -122,7 +121,7 @@ func segmentKube(p *powerline) []pwl.Segment {
if namespace != "" {
content := namespace
if !kubeIconHasBeenDrawnYet {
content = fmt.Sprintf("⎈ %s", content)
content = p.symbols.KubeIndicator + " " + content
}
segments = append(segments, pwl.Segment{
Name: "kube-namespace",
Expand Down

0 comments on commit 7dca1fa

Please sign in to comment.