Skip to content

Commit

Permalink
Merge pull request justjanne#339 from mjgiarlo/overrideable-node-indi…
Browse files Browse the repository at this point in the history
…cator

Allow node indicator to be overridden
  • Loading branch information
justjanne authored Mar 8, 2022
2 parents 61f7657 + f708b82 commit c1f9df8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 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{
RepoStashed: "\u2691",

VenvIndicator: "\uE235",
NodeIndicator: "\u2B22",
},
"patched": {
Lock: "\uE0A2",
Expand All @@ -104,6 +105,7 @@ var defaults = Config{
RepoStashed: "\u2691",

VenvIndicator: "\uE235",
NodeIndicator: "\u2B22",
},
"flat": {
RepoDetached: "\u2693",
Expand All @@ -116,6 +118,7 @@ var defaults = Config{
RepoStashed: "\u2691",

VenvIndicator: "\uE235",
NodeIndicator: "\u2B22",
},
},
Shells: ShellMap{
Expand Down
4 changes: 2 additions & 2 deletions segment-node.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func segmentNode(p *powerline) []pwl.Segment {
if nodeVersion != "" {
segments = append(segments, pwl.Segment{
Name: "node",
Content: "\u2B22 " + nodeVersion,
Content: p.symbols.NodeIndicator + " " + nodeVersion,
Foreground: p.theme.NodeVersionFg,
Background: p.theme.NodeVersionBg,
})
Expand All @@ -63,7 +63,7 @@ func segmentNode(p *powerline) []pwl.Segment {
if packageVersion != "" {
segments = append(segments, pwl.Segment{
Name: "node-segment",
Content: packageVersion + " \u2B22",
Content: packageVersion + " " + p.symbols.NodeIndicator,
Foreground: p.theme.NodeFg,
Background: p.theme.NodeBg,
})
Expand Down
1 change: 1 addition & 0 deletions themes.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type SymbolTemplate struct {
RepoStashed string

VenvIndicator string
NodeIndicator string
}

// Theme definitions
Expand Down

0 comments on commit c1f9df8

Please sign in to comment.