mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(git): remove Repo struct
This commit is contained in:
parent
cb17bb914a
commit
2d25c59c00
|
@ -43,7 +43,7 @@ You need to extend or create a custom theme with your tooltips. For example:
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}"
|
"template": "{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -37,16 +37,16 @@ An alternative is to use the [Posh-Git segment][poshgit]
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#ffeb3b",
|
"background": "#ffeb3b",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#FFEB3B{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FFEB3B{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#FFCC80{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#B388FF{{ end }}",
|
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#B388FB{{ end }}"
|
"{{ if gt .Behind 0 }}#B388FB{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -97,17 +97,17 @@ You can set the following properties to `true` to enable fetching additional inf
|
||||||
|
|
||||||
## Template Properties
|
## Template Properties
|
||||||
|
|
||||||
- `.Repo.Working`: `GitStatus` - changes in the working tree (see below)
|
- `.Working`: `GitStatus` - changes in the working tree (see below)
|
||||||
- `.Repo.Staging`: `GitStatus` - staged changes in the work tree (see below)
|
- `.Staging`: `GitStatus` - staged changes in the work tree (see below)
|
||||||
- `.Repo.HEAD`: `string` - the current HEAD context (branch/rebase/merge/...)
|
- `.HEAD`: `string` - the current HEAD context (branch/rebase/merge/...)
|
||||||
- `.Repo.Behind`: `int` - commits behind of upstream
|
- `.Behind`: `int` - commits behind of upstream
|
||||||
- `.Repo.Ahead`: `int` - commits ahead of upstream
|
- `.Ahead`: `int` - commits ahead of upstream
|
||||||
- `.Repo.BranchStatus`: `string` - the current branch context (ahead/behind string representation)
|
- `.BranchStatus`: `string` - the current branch context (ahead/behind string representation)
|
||||||
- `.Repo.Upstream`: `string` - the upstream name (remote)
|
- `.Upstream`: `string` - the upstream name (remote)
|
||||||
- `.Repo.UpstreamIcon`: `string` - the upstream icon (based on the icons above)
|
- `.UpstreamIcon`: `string` - the upstream icon (based on the icons above)
|
||||||
- `.Repo.StashCount`: `int` - the stash count
|
- `.StashCount`: `int` - the stash count
|
||||||
- `.Repo.WorktreeCount`: `int` - the worktree count
|
- `.WorktreeCount`: `int` - the worktree count
|
||||||
- `.Repo.IsWorkTree`: `boolean` - if in a worktree repo or not
|
- `.IsWorkTree`: `boolean` - if in a worktree repo or not
|
||||||
|
|
||||||
### GitStatus
|
### GitStatus
|
||||||
|
|
||||||
|
|
|
@ -8,24 +8,6 @@ import (
|
||||||
"gopkg.in/ini.v1"
|
"gopkg.in/ini.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Repo represents a git repository
|
|
||||||
type Repo struct {
|
|
||||||
Working *GitStatus
|
|
||||||
Staging *GitStatus
|
|
||||||
Ahead int
|
|
||||||
Behind int
|
|
||||||
HEAD string
|
|
||||||
BranchStatus string
|
|
||||||
Upstream string
|
|
||||||
UpstreamIcon string
|
|
||||||
StashCount int
|
|
||||||
WorktreeCount int
|
|
||||||
IsWorkTree bool
|
|
||||||
|
|
||||||
gitWorkingFolder string // .git working folder, can be different of root if using worktree
|
|
||||||
gitRootFolder string // .git root folder
|
|
||||||
}
|
|
||||||
|
|
||||||
// GitStatus represents part of the status of a git repository
|
// GitStatus represents part of the status of a git repository
|
||||||
type GitStatus struct {
|
type GitStatus struct {
|
||||||
Unmerged int
|
Unmerged int
|
||||||
|
@ -83,7 +65,21 @@ func (s *GitStatus) String() string {
|
||||||
type git struct {
|
type git struct {
|
||||||
props *properties
|
props *properties
|
||||||
env environmentInfo
|
env environmentInfo
|
||||||
Repo *Repo
|
|
||||||
|
Working *GitStatus
|
||||||
|
Staging *GitStatus
|
||||||
|
Ahead int
|
||||||
|
Behind int
|
||||||
|
HEAD string
|
||||||
|
BranchStatus string
|
||||||
|
Upstream string
|
||||||
|
UpstreamIcon string
|
||||||
|
StashCount int
|
||||||
|
WorktreeCount int
|
||||||
|
IsWorkTree bool
|
||||||
|
|
||||||
|
gitWorkingFolder string // .git working folder, can be different of root if using worktree
|
||||||
|
gitRootFolder string // .git root folder
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -146,28 +142,27 @@ func (g *git) enabled() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
g.Repo = &Repo{
|
g.Staging = &GitStatus{}
|
||||||
Staging: &GitStatus{},
|
g.Working = &GitStatus{}
|
||||||
Working: &GitStatus{},
|
|
||||||
}
|
|
||||||
if gitdir.isDir {
|
if gitdir.isDir {
|
||||||
g.Repo.gitWorkingFolder = gitdir.path
|
g.gitWorkingFolder = gitdir.path
|
||||||
g.Repo.gitRootFolder = gitdir.path
|
g.gitRootFolder = gitdir.path
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// handle worktree
|
// handle worktree
|
||||||
g.Repo.gitRootFolder = gitdir.path
|
g.gitRootFolder = gitdir.path
|
||||||
dirPointer := g.env.getFileContent(gitdir.path)
|
dirPointer := g.env.getFileContent(gitdir.path)
|
||||||
dirPointer = strings.Trim(dirPointer, " \r\n")
|
dirPointer = strings.Trim(dirPointer, " \r\n")
|
||||||
matches := findNamedRegexMatch(`^gitdir: (?P<dir>.*)$`, dirPointer)
|
matches := findNamedRegexMatch(`^gitdir: (?P<dir>.*)$`, dirPointer)
|
||||||
if matches != nil && matches["dir"] != "" {
|
if matches != nil && matches["dir"] != "" {
|
||||||
g.Repo.gitWorkingFolder = matches["dir"]
|
g.gitWorkingFolder = matches["dir"]
|
||||||
// in worktrees, the path looks like this: gitdir: path/.git/worktrees/branch
|
// in worktrees, the path looks like this: gitdir: path/.git/worktrees/branch
|
||||||
// strips the last .git/worktrees part
|
// strips the last .git/worktrees part
|
||||||
// :ind+5 = index + /.git
|
// :ind+5 = index + /.git
|
||||||
ind := strings.LastIndex(g.Repo.gitWorkingFolder, "/.git/worktrees")
|
ind := strings.LastIndex(g.gitWorkingFolder, "/.git/worktrees")
|
||||||
g.Repo.gitRootFolder = g.Repo.gitWorkingFolder[:ind+5]
|
g.gitRootFolder = g.gitWorkingFolder[:ind+5]
|
||||||
g.Repo.IsWorkTree = true
|
g.IsWorkTree = true
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -189,19 +184,19 @@ func (g *git) string() string {
|
||||||
statusColorsEnabled := g.props.getBool(StatusColorsEnabled, false)
|
statusColorsEnabled := g.props.getBool(StatusColorsEnabled, false)
|
||||||
displayStatus := g.getBool(FetchStatus, DisplayStatus)
|
displayStatus := g.getBool(FetchStatus, DisplayStatus)
|
||||||
if !displayStatus {
|
if !displayStatus {
|
||||||
g.Repo.HEAD = g.getPrettyHEADName()
|
g.HEAD = g.getPrettyHEADName()
|
||||||
}
|
}
|
||||||
if displayStatus || statusColorsEnabled {
|
if displayStatus || statusColorsEnabled {
|
||||||
g.setGitStatus()
|
g.setGitStatus()
|
||||||
}
|
}
|
||||||
if g.Repo.Upstream != "" && g.getBool(FetchUpstreamIcon, DisplayUpstreamIcon) {
|
if g.Upstream != "" && g.getBool(FetchUpstreamIcon, DisplayUpstreamIcon) {
|
||||||
g.Repo.UpstreamIcon = g.getUpstreamIcon()
|
g.UpstreamIcon = g.getUpstreamIcon()
|
||||||
}
|
}
|
||||||
if g.getBool(FetchStashCount, DisplayStashCount) {
|
if g.getBool(FetchStashCount, DisplayStashCount) {
|
||||||
g.Repo.StashCount = g.getStashContext()
|
g.StashCount = g.getStashContext()
|
||||||
}
|
}
|
||||||
if g.getBool(FetchWorktreeCount, DisplayWorktreeCount) {
|
if g.getBool(FetchWorktreeCount, DisplayWorktreeCount) {
|
||||||
g.Repo.WorktreeCount = g.getWorktreeContext()
|
g.WorktreeCount = g.getWorktreeContext()
|
||||||
}
|
}
|
||||||
// use template if available
|
// use template if available
|
||||||
segmentTemplate := g.props.getString(SegmentTemplate, "")
|
segmentTemplate := g.props.getString(SegmentTemplate, "")
|
||||||
|
@ -232,26 +227,26 @@ func (g *git) init(props *properties, env environmentInfo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getBranchStatus() string {
|
func (g *git) getBranchStatus() string {
|
||||||
if g.Repo.Ahead > 0 && g.Repo.Behind > 0 {
|
if g.Ahead > 0 && g.Behind > 0 {
|
||||||
return fmt.Sprintf(" %s%d %s%d", g.props.getString(BranchAheadIcon, "\u2191"), g.Repo.Ahead, g.props.getString(BranchBehindIcon, "\u2193"), g.Repo.Behind)
|
return fmt.Sprintf(" %s%d %s%d", g.props.getString(BranchAheadIcon, "\u2191"), g.Ahead, g.props.getString(BranchBehindIcon, "\u2193"), g.Behind)
|
||||||
}
|
}
|
||||||
if g.Repo.Ahead > 0 {
|
if g.Ahead > 0 {
|
||||||
return fmt.Sprintf(" %s%d", g.props.getString(BranchAheadIcon, "\u2191"), g.Repo.Ahead)
|
return fmt.Sprintf(" %s%d", g.props.getString(BranchAheadIcon, "\u2191"), g.Ahead)
|
||||||
}
|
}
|
||||||
if g.Repo.Behind > 0 {
|
if g.Behind > 0 {
|
||||||
return fmt.Sprintf(" %s%d", g.props.getString(BranchBehindIcon, "\u2193"), g.Repo.Behind)
|
return fmt.Sprintf(" %s%d", g.props.getString(BranchBehindIcon, "\u2193"), g.Behind)
|
||||||
}
|
}
|
||||||
if g.Repo.Behind == 0 && g.Repo.Ahead == 0 && g.Repo.Upstream != "" {
|
if g.Behind == 0 && g.Ahead == 0 && g.Upstream != "" {
|
||||||
return fmt.Sprintf(" %s", g.props.getString(BranchIdenticalIcon, "\u2261"))
|
return fmt.Sprintf(" %s", g.props.getString(BranchIdenticalIcon, "\u2261"))
|
||||||
}
|
}
|
||||||
if g.Repo.Upstream == "" {
|
if g.Upstream == "" {
|
||||||
return fmt.Sprintf(" %s", g.props.getString(BranchGoneIcon, "\u2262"))
|
return fmt.Sprintf(" %s", g.props.getString(BranchGoneIcon, "\u2262"))
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getUpstreamIcon() string {
|
func (g *git) getUpstreamIcon() string {
|
||||||
upstream := replaceAllString("/.*", g.Repo.Upstream, "")
|
upstream := replaceAllString("/.*", g.Upstream, "")
|
||||||
url := g.getOriginURL(upstream)
|
url := g.getOriginURL(upstream)
|
||||||
if strings.Contains(url, "github") {
|
if strings.Contains(url, "github") {
|
||||||
return g.props.getString(GithubIcon, "\uF408 ")
|
return g.props.getString(GithubIcon, "\uF408 ")
|
||||||
|
@ -271,18 +266,18 @@ func (g *git) getUpstreamIcon() string {
|
||||||
func (g *git) setGitStatus() {
|
func (g *git) setGitStatus() {
|
||||||
output := g.getGitCommandOutput("status", "-unormal", "--short", "--branch")
|
output := g.getGitCommandOutput("status", "-unormal", "--short", "--branch")
|
||||||
splittedOutput := strings.Split(output, "\n")
|
splittedOutput := strings.Split(output, "\n")
|
||||||
g.Repo.Working.parse(splittedOutput, true)
|
g.Working.parse(splittedOutput, true)
|
||||||
g.Repo.Staging.parse(splittedOutput, false)
|
g.Staging.parse(splittedOutput, false)
|
||||||
status := g.parseGitStatusInfo(splittedOutput[0])
|
status := g.parseGitStatusInfo(splittedOutput[0])
|
||||||
if status["local"] != "" {
|
if status["local"] != "" {
|
||||||
g.Repo.Ahead, _ = strconv.Atoi(status["ahead"])
|
g.Ahead, _ = strconv.Atoi(status["ahead"])
|
||||||
g.Repo.Behind, _ = strconv.Atoi(status["behind"])
|
g.Behind, _ = strconv.Atoi(status["behind"])
|
||||||
if status["upstream_status"] != "gone" {
|
if status["upstream_status"] != "gone" {
|
||||||
g.Repo.Upstream = status["upstream"]
|
g.Upstream = status["upstream"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g.Repo.HEAD = g.getGitHEADContext(status["local"])
|
g.HEAD = g.getGitHEADContext(status["local"])
|
||||||
g.Repo.BranchStatus = g.getBranchStatus()
|
g.BranchStatus = g.getBranchStatus()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getGitCommand() string {
|
func (g *git) getGitCommand() string {
|
||||||
|
@ -297,7 +292,7 @@ func (g *git) getGitCommand() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getGitCommandOutput(args ...string) string {
|
func (g *git) getGitCommandOutput(args ...string) string {
|
||||||
args = append([]string{"-C", strings.TrimSuffix(g.Repo.gitRootFolder, ".git"), "--no-optional-locks", "-c", "core.quotepath=false", "-c", "color.status=false"}, args...)
|
args = append([]string{"-C", strings.TrimSuffix(g.gitRootFolder, ".git"), "--no-optional-locks", "-c", "core.quotepath=false", "-c", "color.status=false"}, args...)
|
||||||
val, _ := g.env.runCommand(g.getGitCommand(), args...)
|
val, _ := g.env.runCommand(g.getGitCommand(), args...)
|
||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
|
@ -311,30 +306,30 @@ func (g *git) getGitHEADContext(ref string) string {
|
||||||
ref = fmt.Sprintf("%s%s", branchIcon, ref)
|
ref = fmt.Sprintf("%s%s", branchIcon, ref)
|
||||||
}
|
}
|
||||||
// rebase
|
// rebase
|
||||||
if g.env.hasFolder(g.Repo.gitWorkingFolder + "/rebase-merge") {
|
if g.env.hasFolder(g.gitWorkingFolder + "/rebase-merge") {
|
||||||
head := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-merge/head-name")
|
head := g.getGitFileContents(g.gitWorkingFolder, "rebase-merge/head-name")
|
||||||
origin := strings.Replace(head, "refs/heads/", "", 1)
|
origin := strings.Replace(head, "refs/heads/", "", 1)
|
||||||
origin = g.truncateBranch(origin)
|
origin = g.truncateBranch(origin)
|
||||||
onto := g.getGitRefFileSymbolicName("rebase-merge/onto")
|
onto := g.getGitRefFileSymbolicName("rebase-merge/onto")
|
||||||
onto = g.truncateBranch(onto)
|
onto = g.truncateBranch(onto)
|
||||||
step := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-merge/msgnum")
|
step := g.getGitFileContents(g.gitWorkingFolder, "rebase-merge/msgnum")
|
||||||
total := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-merge/end")
|
total := g.getGitFileContents(g.gitWorkingFolder, "rebase-merge/end")
|
||||||
icon := g.props.getString(RebaseIcon, "\uE728 ")
|
icon := g.props.getString(RebaseIcon, "\uE728 ")
|
||||||
return fmt.Sprintf("%s%s%s onto %s%s (%s/%s) at %s", icon, branchIcon, origin, branchIcon, onto, step, total, ref)
|
return fmt.Sprintf("%s%s%s onto %s%s (%s/%s) at %s", icon, branchIcon, origin, branchIcon, onto, step, total, ref)
|
||||||
}
|
}
|
||||||
if g.env.hasFolder(g.Repo.gitWorkingFolder + "/rebase-apply") {
|
if g.env.hasFolder(g.gitWorkingFolder + "/rebase-apply") {
|
||||||
head := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-apply/head-name")
|
head := g.getGitFileContents(g.gitWorkingFolder, "rebase-apply/head-name")
|
||||||
origin := strings.Replace(head, "refs/heads/", "", 1)
|
origin := strings.Replace(head, "refs/heads/", "", 1)
|
||||||
origin = g.truncateBranch(origin)
|
origin = g.truncateBranch(origin)
|
||||||
step := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-apply/next")
|
step := g.getGitFileContents(g.gitWorkingFolder, "rebase-apply/next")
|
||||||
total := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-apply/last")
|
total := g.getGitFileContents(g.gitWorkingFolder, "rebase-apply/last")
|
||||||
icon := g.props.getString(RebaseIcon, "\uE728 ")
|
icon := g.props.getString(RebaseIcon, "\uE728 ")
|
||||||
return fmt.Sprintf("%s%s%s (%s/%s) at %s", icon, branchIcon, origin, step, total, ref)
|
return fmt.Sprintf("%s%s%s (%s/%s) at %s", icon, branchIcon, origin, step, total, ref)
|
||||||
}
|
}
|
||||||
// merge
|
// merge
|
||||||
if g.hasGitFile("MERGE_MSG") && g.hasGitFile("MERGE_HEAD") {
|
if g.hasGitFile("MERGE_MSG") && g.hasGitFile("MERGE_HEAD") {
|
||||||
icon := g.props.getString(MergeIcon, "\uE727 ")
|
icon := g.props.getString(MergeIcon, "\uE727 ")
|
||||||
mergeContext := g.getGitFileContents(g.Repo.gitWorkingFolder, "MERGE_MSG")
|
mergeContext := g.getGitFileContents(g.gitWorkingFolder, "MERGE_MSG")
|
||||||
matches := findNamedRegexMatch(`Merge (?P<type>(remote-tracking )?branch|commit|tag) '(?P<head>.*)' into`, mergeContext)
|
matches := findNamedRegexMatch(`Merge (?P<type>(remote-tracking )?branch|commit|tag) '(?P<head>.*)' into`, mergeContext)
|
||||||
|
|
||||||
if matches != nil && matches["head"] != "" {
|
if matches != nil && matches["head"] != "" {
|
||||||
|
@ -357,15 +352,15 @@ func (g *git) getGitHEADContext(ref string) string {
|
||||||
// reverts then CHERRY_PICK_HEAD/REVERT_HEAD will not exist so we have to read
|
// reverts then CHERRY_PICK_HEAD/REVERT_HEAD will not exist so we have to read
|
||||||
// the todo file.
|
// the todo file.
|
||||||
if g.hasGitFile("CHERRY_PICK_HEAD") {
|
if g.hasGitFile("CHERRY_PICK_HEAD") {
|
||||||
sha := g.getGitFileContents(g.Repo.gitWorkingFolder, "CHERRY_PICK_HEAD")
|
sha := g.getGitFileContents(g.gitWorkingFolder, "CHERRY_PICK_HEAD")
|
||||||
icon := g.props.getString(CherryPickIcon, "\uE29B ")
|
icon := g.props.getString(CherryPickIcon, "\uE29B ")
|
||||||
return fmt.Sprintf("%s%s onto %s", icon, sha[0:6], ref)
|
return fmt.Sprintf("%s%s onto %s", icon, sha[0:6], ref)
|
||||||
} else if g.hasGitFile("REVERT_HEAD") {
|
} else if g.hasGitFile("REVERT_HEAD") {
|
||||||
sha := g.getGitFileContents(g.Repo.gitWorkingFolder, "REVERT_HEAD")
|
sha := g.getGitFileContents(g.gitWorkingFolder, "REVERT_HEAD")
|
||||||
icon := g.props.getString(RevertIcon, "\uF0E2 ")
|
icon := g.props.getString(RevertIcon, "\uF0E2 ")
|
||||||
return fmt.Sprintf("%s%s onto %s", icon, sha[0:6], ref)
|
return fmt.Sprintf("%s%s onto %s", icon, sha[0:6], ref)
|
||||||
} else if g.hasGitFile("sequencer/todo") {
|
} else if g.hasGitFile("sequencer/todo") {
|
||||||
todo := g.getGitFileContents(g.Repo.gitWorkingFolder, "sequencer/todo")
|
todo := g.getGitFileContents(g.gitWorkingFolder, "sequencer/todo")
|
||||||
matches := findNamedRegexMatch(`^(?P<action>p|pick|revert)\s+(?P<sha>\S+)`, todo)
|
matches := findNamedRegexMatch(`^(?P<action>p|pick|revert)\s+(?P<sha>\S+)`, todo)
|
||||||
if matches != nil && matches["sha"] != "" {
|
if matches != nil && matches["sha"] != "" {
|
||||||
action := matches["action"]
|
action := matches["action"]
|
||||||
|
@ -392,7 +387,7 @@ func (g *git) truncateBranch(branch string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) hasGitFile(file string) bool {
|
func (g *git) hasGitFile(file string) bool {
|
||||||
return g.env.hasFilesInDir(g.Repo.gitWorkingFolder, file)
|
return g.env.hasFilesInDir(g.gitWorkingFolder, file)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getGitFileContents(folder, file string) string {
|
func (g *git) getGitFileContents(folder, file string) string {
|
||||||
|
@ -400,13 +395,13 @@ func (g *git) getGitFileContents(folder, file string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getGitRefFileSymbolicName(refFile string) string {
|
func (g *git) getGitRefFileSymbolicName(refFile string) string {
|
||||||
ref := g.getGitFileContents(g.Repo.gitWorkingFolder, refFile)
|
ref := g.getGitFileContents(g.gitWorkingFolder, refFile)
|
||||||
return g.getGitCommandOutput("name-rev", "--name-only", "--exclude=tags/*", ref)
|
return g.getGitCommandOutput("name-rev", "--name-only", "--exclude=tags/*", ref)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getPrettyHEADName() string {
|
func (g *git) getPrettyHEADName() string {
|
||||||
var ref string
|
var ref string
|
||||||
HEAD := g.getGitFileContents(g.Repo.gitWorkingFolder, "HEAD")
|
HEAD := g.getGitFileContents(g.gitWorkingFolder, "HEAD")
|
||||||
branchPrefix := "ref: refs/heads/"
|
branchPrefix := "ref: refs/heads/"
|
||||||
if strings.HasPrefix(HEAD, branchPrefix) {
|
if strings.HasPrefix(HEAD, branchPrefix) {
|
||||||
ref = strings.TrimPrefix(HEAD, branchPrefix)
|
ref = strings.TrimPrefix(HEAD, branchPrefix)
|
||||||
|
@ -429,7 +424,7 @@ func (g *git) getPrettyHEADName() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getStashContext() int {
|
func (g *git) getStashContext() int {
|
||||||
stashContent := g.getGitFileContents(g.Repo.gitRootFolder, "logs/refs/stash")
|
stashContent := g.getGitFileContents(g.gitRootFolder, "logs/refs/stash")
|
||||||
if stashContent == "" {
|
if stashContent == "" {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -438,10 +433,10 @@ func (g *git) getStashContext() int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getWorktreeContext() int {
|
func (g *git) getWorktreeContext() int {
|
||||||
if !g.env.hasFolder(g.Repo.gitRootFolder + "/worktrees") {
|
if !g.env.hasFolder(g.gitRootFolder + "/worktrees") {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
worktreeFolders := g.env.getFoldersList(g.Repo.gitRootFolder + "/worktrees")
|
worktreeFolders := g.env.getFoldersList(g.gitRootFolder + "/worktrees")
|
||||||
return len(worktreeFolders)
|
return len(worktreeFolders)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,7 +446,7 @@ func (g *git) parseGitStatusInfo(branchInfo string) map[string]string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getOriginURL(upstream string) string {
|
func (g *git) getOriginURL(upstream string) string {
|
||||||
cfg, err := ini.Load(g.Repo.gitRootFolder + "/config")
|
cfg, err := ini.Load(g.gitRootFolder + "/config")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return g.getGitCommandOutput("remote", "get-url", upstream)
|
return g.getGitCommandOutput("remote", "get-url", upstream)
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,28 +58,28 @@ func (g *git) renderDeprecatedString(statusColorsEnabled bool) string {
|
||||||
}
|
}
|
||||||
buffer := new(bytes.Buffer)
|
buffer := new(bytes.Buffer)
|
||||||
// remote (if available)
|
// remote (if available)
|
||||||
if len(g.Repo.UpstreamIcon) != 0 {
|
if len(g.UpstreamIcon) != 0 {
|
||||||
fmt.Fprintf(buffer, "%s", g.Repo.UpstreamIcon)
|
fmt.Fprintf(buffer, "%s", g.UpstreamIcon)
|
||||||
}
|
}
|
||||||
// branchName
|
// branchName
|
||||||
fmt.Fprintf(buffer, "%s", g.Repo.HEAD)
|
fmt.Fprintf(buffer, "%s", g.HEAD)
|
||||||
if len(g.Repo.BranchStatus) > 0 {
|
if len(g.BranchStatus) > 0 {
|
||||||
buffer.WriteString(g.Repo.BranchStatus)
|
buffer.WriteString(g.BranchStatus)
|
||||||
}
|
}
|
||||||
if g.Repo.Staging.Changed {
|
if g.Staging.Changed {
|
||||||
fmt.Fprint(buffer, g.getStatusDetailString(g.Repo.Staging, StagingColor, LocalStagingIcon, " \uF046"))
|
fmt.Fprint(buffer, g.getStatusDetailString(g.Staging, StagingColor, LocalStagingIcon, " \uF046"))
|
||||||
}
|
}
|
||||||
if g.Repo.Staging.Changed && g.Repo.Working.Changed {
|
if g.Staging.Changed && g.Working.Changed {
|
||||||
fmt.Fprint(buffer, g.props.getString(StatusSeparatorIcon, " |"))
|
fmt.Fprint(buffer, g.props.getString(StatusSeparatorIcon, " |"))
|
||||||
}
|
}
|
||||||
if g.Repo.Working.Changed {
|
if g.Working.Changed {
|
||||||
fmt.Fprint(buffer, g.getStatusDetailString(g.Repo.Working, WorkingColor, LocalWorkingIcon, " \uF044"))
|
fmt.Fprint(buffer, g.getStatusDetailString(g.Working, WorkingColor, LocalWorkingIcon, " \uF044"))
|
||||||
}
|
}
|
||||||
if g.Repo.StashCount != 0 {
|
if g.StashCount != 0 {
|
||||||
fmt.Fprintf(buffer, " %s%d", g.props.getString(StashCountIcon, "\uF692 "), g.Repo.StashCount)
|
fmt.Fprintf(buffer, " %s%d", g.props.getString(StashCountIcon, "\uF692 "), g.StashCount)
|
||||||
}
|
}
|
||||||
if g.Repo.WorktreeCount != 0 {
|
if g.WorktreeCount != 0 {
|
||||||
fmt.Fprintf(buffer, " %s%d", g.props.getString(WorktreeCountIcon, "\uf1bb "), g.Repo.WorktreeCount)
|
fmt.Fprintf(buffer, " %s%d", g.props.getString(WorktreeCountIcon, "\uf1bb "), g.WorktreeCount)
|
||||||
}
|
}
|
||||||
return buffer.String()
|
return buffer.String()
|
||||||
}
|
}
|
||||||
|
@ -93,13 +93,13 @@ func (g *git) SetStatusColor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *git) getStatusColor(defaultValue string) string {
|
func (g *git) getStatusColor(defaultValue string) string {
|
||||||
if g.Repo.Staging.Changed || g.Repo.Working.Changed {
|
if g.Staging.Changed || g.Working.Changed {
|
||||||
return g.props.getColor(LocalChangesColor, defaultValue)
|
return g.props.getColor(LocalChangesColor, defaultValue)
|
||||||
} else if g.Repo.Ahead > 0 && g.Repo.Behind > 0 {
|
} else if g.Ahead > 0 && g.Behind > 0 {
|
||||||
return g.props.getColor(AheadAndBehindColor, defaultValue)
|
return g.props.getColor(AheadAndBehindColor, defaultValue)
|
||||||
} else if g.Repo.Ahead > 0 {
|
} else if g.Ahead > 0 {
|
||||||
return g.props.getColor(AheadColor, defaultValue)
|
return g.props.getColor(AheadColor, defaultValue)
|
||||||
} else if g.Repo.Behind > 0 {
|
} else if g.Behind > 0 {
|
||||||
return g.props.getColor(BehindColor, defaultValue)
|
return g.props.getColor(BehindColor, defaultValue)
|
||||||
}
|
}
|
||||||
return defaultValue
|
return defaultValue
|
||||||
|
|
|
@ -110,32 +110,26 @@ func TestGetStatusDetailStringNoStatusColorOverride(t *testing.T) {
|
||||||
|
|
||||||
func TestGetStatusColorLocalChangesStaging(t *testing.T) {
|
func TestGetStatusColorLocalChangesStaging(t *testing.T) {
|
||||||
expected := changesColor
|
expected := changesColor
|
||||||
repo := &Repo{
|
|
||||||
Staging: &GitStatus{
|
|
||||||
Changed: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
g := &git{
|
g := &git{
|
||||||
Repo: repo,
|
|
||||||
props: &properties{
|
props: &properties{
|
||||||
values: map[Property]interface{}{
|
values: map[Property]interface{}{
|
||||||
LocalChangesColor: expected,
|
LocalChangesColor: expected,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Staging: &GitStatus{
|
||||||
|
Changed: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
assert.Equal(t, expected, g.getStatusColor("#fg1111"))
|
assert.Equal(t, expected, g.getStatusColor("#fg1111"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetStatusColorLocalChangesWorking(t *testing.T) {
|
func TestGetStatusColorLocalChangesWorking(t *testing.T) {
|
||||||
expected := changesColor
|
expected := changesColor
|
||||||
repo := &Repo{
|
g := &git{
|
||||||
Staging: &GitStatus{},
|
Staging: &GitStatus{},
|
||||||
Working: &GitStatus{
|
Working: &GitStatus{
|
||||||
Changed: true,
|
Changed: true,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
g := &git{
|
|
||||||
Repo: repo,
|
|
||||||
props: &properties{
|
props: &properties{
|
||||||
values: map[Property]interface{}{
|
values: map[Property]interface{}{
|
||||||
LocalChangesColor: expected,
|
LocalChangesColor: expected,
|
||||||
|
@ -147,14 +141,11 @@ func TestGetStatusColorLocalChangesWorking(t *testing.T) {
|
||||||
|
|
||||||
func TestGetStatusColorAheadAndBehind(t *testing.T) {
|
func TestGetStatusColorAheadAndBehind(t *testing.T) {
|
||||||
expected := changesColor
|
expected := changesColor
|
||||||
repo := &Repo{
|
g := &git{
|
||||||
Staging: &GitStatus{},
|
Staging: &GitStatus{},
|
||||||
Working: &GitStatus{},
|
Working: &GitStatus{},
|
||||||
Ahead: 1,
|
Ahead: 1,
|
||||||
Behind: 3,
|
Behind: 3,
|
||||||
}
|
|
||||||
g := &git{
|
|
||||||
Repo: repo,
|
|
||||||
props: &properties{
|
props: &properties{
|
||||||
values: map[Property]interface{}{
|
values: map[Property]interface{}{
|
||||||
AheadAndBehindColor: expected,
|
AheadAndBehindColor: expected,
|
||||||
|
@ -166,14 +157,11 @@ func TestGetStatusColorAheadAndBehind(t *testing.T) {
|
||||||
|
|
||||||
func TestGetStatusColorAhead(t *testing.T) {
|
func TestGetStatusColorAhead(t *testing.T) {
|
||||||
expected := changesColor
|
expected := changesColor
|
||||||
repo := &Repo{
|
g := &git{
|
||||||
Staging: &GitStatus{},
|
Staging: &GitStatus{},
|
||||||
Working: &GitStatus{},
|
Working: &GitStatus{},
|
||||||
Ahead: 1,
|
Ahead: 1,
|
||||||
Behind: 0,
|
Behind: 0,
|
||||||
}
|
|
||||||
g := &git{
|
|
||||||
Repo: repo,
|
|
||||||
props: &properties{
|
props: &properties{
|
||||||
values: map[Property]interface{}{
|
values: map[Property]interface{}{
|
||||||
AheadColor: expected,
|
AheadColor: expected,
|
||||||
|
@ -185,14 +173,11 @@ func TestGetStatusColorAhead(t *testing.T) {
|
||||||
|
|
||||||
func TestGetStatusColorBehind(t *testing.T) {
|
func TestGetStatusColorBehind(t *testing.T) {
|
||||||
expected := changesColor
|
expected := changesColor
|
||||||
repo := &Repo{
|
g := &git{
|
||||||
Staging: &GitStatus{},
|
Staging: &GitStatus{},
|
||||||
Working: &GitStatus{},
|
Working: &GitStatus{},
|
||||||
Ahead: 0,
|
Ahead: 0,
|
||||||
Behind: 5,
|
Behind: 5,
|
||||||
}
|
|
||||||
g := &git{
|
|
||||||
Repo: repo,
|
|
||||||
props: &properties{
|
props: &properties{
|
||||||
values: map[Property]interface{}{
|
values: map[Property]interface{}{
|
||||||
BehindColor: expected,
|
BehindColor: expected,
|
||||||
|
@ -204,14 +189,11 @@ func TestGetStatusColorBehind(t *testing.T) {
|
||||||
|
|
||||||
func TestGetStatusColorDefault(t *testing.T) {
|
func TestGetStatusColorDefault(t *testing.T) {
|
||||||
expected := changesColor
|
expected := changesColor
|
||||||
repo := &Repo{
|
g := &git{
|
||||||
Staging: &GitStatus{},
|
Staging: &GitStatus{},
|
||||||
Working: &GitStatus{},
|
Working: &GitStatus{},
|
||||||
Ahead: 0,
|
Ahead: 0,
|
||||||
Behind: 0,
|
Behind: 0,
|
||||||
}
|
|
||||||
g := &git{
|
|
||||||
Repo: repo,
|
|
||||||
props: &properties{
|
props: &properties{
|
||||||
values: map[Property]interface{}{
|
values: map[Property]interface{}{
|
||||||
BehindColor: changesColor,
|
BehindColor: changesColor,
|
||||||
|
@ -223,13 +205,10 @@ func TestGetStatusColorDefault(t *testing.T) {
|
||||||
|
|
||||||
func TestSetStatusColorForeground(t *testing.T) {
|
func TestSetStatusColorForeground(t *testing.T) {
|
||||||
expected := changesColor
|
expected := changesColor
|
||||||
repo := &Repo{
|
g := &git{
|
||||||
Staging: &GitStatus{
|
Staging: &GitStatus{
|
||||||
Changed: true,
|
Changed: true,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
g := &git{
|
|
||||||
Repo: repo,
|
|
||||||
props: &properties{
|
props: &properties{
|
||||||
values: map[Property]interface{}{
|
values: map[Property]interface{}{
|
||||||
LocalChangesColor: changesColor,
|
LocalChangesColor: changesColor,
|
||||||
|
@ -245,13 +224,10 @@ func TestSetStatusColorForeground(t *testing.T) {
|
||||||
|
|
||||||
func TestSetStatusColorBackground(t *testing.T) {
|
func TestSetStatusColorBackground(t *testing.T) {
|
||||||
expected := changesColor
|
expected := changesColor
|
||||||
repo := &Repo{
|
g := &git{
|
||||||
Staging: &GitStatus{
|
Staging: &GitStatus{
|
||||||
Changed: true,
|
Changed: true,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
g := &git{
|
|
||||||
Repo: repo,
|
|
||||||
props: &properties{
|
props: &properties{
|
||||||
values: map[Property]interface{}{
|
values: map[Property]interface{}{
|
||||||
LocalChangesColor: changesColor,
|
LocalChangesColor: changesColor,
|
||||||
|
|
|
@ -37,7 +37,7 @@ func TestEnabledInWorkingDirectory(t *testing.T) {
|
||||||
env: env,
|
env: env,
|
||||||
}
|
}
|
||||||
assert.True(t, g.enabled())
|
assert.True(t, g.enabled())
|
||||||
assert.Equal(t, fileInfo.path, g.Repo.gitWorkingFolder)
|
assert.Equal(t, fileInfo.path, g.gitWorkingFolder)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEnabledInWorkingTree(t *testing.T) {
|
func TestEnabledInWorkingTree(t *testing.T) {
|
||||||
|
@ -56,7 +56,7 @@ func TestEnabledInWorkingTree(t *testing.T) {
|
||||||
env: env,
|
env: env,
|
||||||
}
|
}
|
||||||
assert.True(t, g.enabled())
|
assert.True(t, g.enabled())
|
||||||
assert.Equal(t, "/dir/hello/burp/burp", g.Repo.gitWorkingFolder)
|
assert.Equal(t, "/dir/hello/burp/burp", g.gitWorkingFolder)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetGitOutputForCommand(t *testing.T) {
|
func TestGetGitOutputForCommand(t *testing.T) {
|
||||||
|
@ -69,9 +69,7 @@ func TestGetGitOutputForCommand(t *testing.T) {
|
||||||
env.On("getRuntimeGOOS", nil).Return("unix")
|
env.On("getRuntimeGOOS", nil).Return("unix")
|
||||||
g := &git{
|
g := &git{
|
||||||
env: env,
|
env: env,
|
||||||
Repo: &Repo{
|
|
||||||
gitRootFolder: "test",
|
gitRootFolder: "test",
|
||||||
},
|
|
||||||
}
|
}
|
||||||
got := g.getGitCommandOutput(commandArgs...)
|
got := g.getGitCommandOutput(commandArgs...)
|
||||||
assert.Equal(t, want, got)
|
assert.Equal(t, want, got)
|
||||||
|
@ -132,11 +130,9 @@ func setupHEADContextEnv(context *detachedContext) *git {
|
||||||
env.On("getRuntimeGOOS", nil).Return("unix")
|
env.On("getRuntimeGOOS", nil).Return("unix")
|
||||||
g := &git{
|
g := &git{
|
||||||
env: env,
|
env: env,
|
||||||
Repo: &Repo{
|
|
||||||
gitWorkingFolder: "",
|
gitWorkingFolder: "",
|
||||||
Working: &GitStatus{},
|
Working: &GitStatus{},
|
||||||
Staging: &GitStatus{},
|
Staging: &GitStatus{},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
return g
|
return g
|
||||||
}
|
}
|
||||||
|
@ -387,10 +383,8 @@ func TestGetStashContextZeroEntries(t *testing.T) {
|
||||||
env := new(MockedEnvironment)
|
env := new(MockedEnvironment)
|
||||||
env.On("getFileContent", "/logs/refs/stash").Return(tc.StashContent)
|
env.On("getFileContent", "/logs/refs/stash").Return(tc.StashContent)
|
||||||
g := &git{
|
g := &git{
|
||||||
Repo: &Repo{
|
|
||||||
gitWorkingFolder: "",
|
|
||||||
},
|
|
||||||
env: env,
|
env: env,
|
||||||
|
gitWorkingFolder: "",
|
||||||
}
|
}
|
||||||
got := g.getStashContext()
|
got := g.getStashContext()
|
||||||
assert.Equal(t, tc.Expected, got)
|
assert.Equal(t, tc.Expected, got)
|
||||||
|
@ -570,10 +564,8 @@ func TestGitUpstream(t *testing.T) {
|
||||||
}
|
}
|
||||||
g := &git{
|
g := &git{
|
||||||
env: env,
|
env: env,
|
||||||
Repo: &Repo{
|
|
||||||
Upstream: "origin/main",
|
|
||||||
},
|
|
||||||
props: props,
|
props: props,
|
||||||
|
Upstream: "origin/main",
|
||||||
}
|
}
|
||||||
upstreamIcon := g.getUpstreamIcon()
|
upstreamIcon := g.getUpstreamIcon()
|
||||||
assert.Equal(t, tc.Expected, upstreamIcon, tc.Case)
|
assert.Equal(t, tc.Expected, upstreamIcon, tc.Case)
|
||||||
|
@ -606,11 +598,9 @@ func TestGetBranchStatus(t *testing.T) {
|
||||||
BranchGoneIcon: "gone",
|
BranchGoneIcon: "gone",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Repo: &Repo{
|
|
||||||
Ahead: tc.Ahead,
|
Ahead: tc.Ahead,
|
||||||
Behind: tc.Behind,
|
Behind: tc.Behind,
|
||||||
Upstream: tc.Upstream,
|
Upstream: tc.Upstream,
|
||||||
},
|
|
||||||
}
|
}
|
||||||
assert.Equal(t, tc.Expected, g.getBranchStatus(), tc.Case)
|
assert.Equal(t, tc.Expected, g.getBranchStatus(), tc.Case)
|
||||||
}
|
}
|
||||||
|
@ -706,13 +696,13 @@ func TestGitTemplateString(t *testing.T) {
|
||||||
Case string
|
Case string
|
||||||
Expected string
|
Expected string
|
||||||
Template string
|
Template string
|
||||||
Repo *Repo
|
Git *git
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
Case: "Only HEAD name",
|
Case: "Only HEAD name",
|
||||||
Expected: "main",
|
Expected: "main",
|
||||||
Template: "{{ .Repo.HEAD }}",
|
Template: "{{ .HEAD }}",
|
||||||
Repo: &Repo{
|
Git: &git{
|
||||||
HEAD: "main",
|
HEAD: "main",
|
||||||
Behind: 2,
|
Behind: 2,
|
||||||
},
|
},
|
||||||
|
@ -720,8 +710,8 @@ func TestGitTemplateString(t *testing.T) {
|
||||||
{
|
{
|
||||||
Case: "Working area changes",
|
Case: "Working area changes",
|
||||||
Expected: "main \uF044 +2 ~3",
|
Expected: "main \uF044 +2 ~3",
|
||||||
Template: "{{ .Repo.HEAD }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}",
|
Template: "{{ .HEAD }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}",
|
||||||
Repo: &Repo{
|
Git: &git{
|
||||||
HEAD: "main",
|
HEAD: "main",
|
||||||
Working: &GitStatus{
|
Working: &GitStatus{
|
||||||
Added: 2,
|
Added: 2,
|
||||||
|
@ -733,8 +723,8 @@ func TestGitTemplateString(t *testing.T) {
|
||||||
{
|
{
|
||||||
Case: "No working area changes",
|
Case: "No working area changes",
|
||||||
Expected: "main",
|
Expected: "main",
|
||||||
Template: "{{ .Repo.HEAD }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}",
|
Template: "{{ .HEAD }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}",
|
||||||
Repo: &Repo{
|
Git: &git{
|
||||||
HEAD: "main",
|
HEAD: "main",
|
||||||
Working: &GitStatus{
|
Working: &GitStatus{
|
||||||
Changed: false,
|
Changed: false,
|
||||||
|
@ -744,8 +734,8 @@ func TestGitTemplateString(t *testing.T) {
|
||||||
{
|
{
|
||||||
Case: "Working and staging area changes",
|
Case: "Working and staging area changes",
|
||||||
Expected: "main \uF046 +5 ~1 \uF044 +2 ~3",
|
Expected: "main \uF046 +5 ~1 \uF044 +2 ~3",
|
||||||
Template: "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}",
|
Template: "{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}",
|
||||||
Repo: &Repo{
|
Git: &git{
|
||||||
HEAD: "main",
|
HEAD: "main",
|
||||||
Working: &GitStatus{
|
Working: &GitStatus{
|
||||||
Added: 2,
|
Added: 2,
|
||||||
|
@ -762,8 +752,8 @@ func TestGitTemplateString(t *testing.T) {
|
||||||
{
|
{
|
||||||
Case: "Working and staging area changes with separator",
|
Case: "Working and staging area changes with separator",
|
||||||
Expected: "main \uF046 +5 ~1 | \uF044 +2 ~3",
|
Expected: "main \uF046 +5 ~1 | \uF044 +2 ~3",
|
||||||
Template: "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}", //nolint:lll
|
Template: "{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}", //nolint:lll
|
||||||
Repo: &Repo{
|
Git: &git{
|
||||||
HEAD: "main",
|
HEAD: "main",
|
||||||
Working: &GitStatus{
|
Working: &GitStatus{
|
||||||
Added: 2,
|
Added: 2,
|
||||||
|
@ -780,8 +770,8 @@ func TestGitTemplateString(t *testing.T) {
|
||||||
{
|
{
|
||||||
Case: "Working and staging area changes with separator and stash count",
|
Case: "Working and staging area changes with separator and stash count",
|
||||||
Expected: "main \uF046 +5 ~1 | \uF044 +2 ~3 \uf692 3",
|
Expected: "main \uF046 +5 ~1 | \uF044 +2 ~3 \uf692 3",
|
||||||
Template: "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}", //nolint:lll
|
Template: "{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}", //nolint:lll
|
||||||
Repo: &Repo{
|
Git: &git{
|
||||||
HEAD: "main",
|
HEAD: "main",
|
||||||
Working: &GitStatus{
|
Working: &GitStatus{
|
||||||
Added: 2,
|
Added: 2,
|
||||||
|
@ -799,8 +789,8 @@ func TestGitTemplateString(t *testing.T) {
|
||||||
{
|
{
|
||||||
Case: "No local changes",
|
Case: "No local changes",
|
||||||
Expected: "main",
|
Expected: "main",
|
||||||
Template: "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046{{ .Repo.Staging.String }}{{ end }}{{ if .Repo.Working.Changed }} \uF044{{ .Repo.Working.String }}{{ end }}",
|
Template: "{{ .HEAD }}{{ if .Staging.Changed }} \uF046{{ .Staging.String }}{{ end }}{{ if .Working.Changed }} \uF044{{ .Working.String }}{{ end }}",
|
||||||
Repo: &Repo{
|
Git: &git{
|
||||||
HEAD: "main",
|
HEAD: "main",
|
||||||
Staging: &GitStatus{},
|
Staging: &GitStatus{},
|
||||||
Working: &GitStatus{},
|
Working: &GitStatus{},
|
||||||
|
@ -809,8 +799,8 @@ func TestGitTemplateString(t *testing.T) {
|
||||||
{
|
{
|
||||||
Case: "Upstream Icon",
|
Case: "Upstream Icon",
|
||||||
Expected: "from GitHub on main",
|
Expected: "from GitHub on main",
|
||||||
Template: "from {{ .Repo.UpstreamIcon }} on {{ .Repo.HEAD }}",
|
Template: "from {{ .UpstreamIcon }} on {{ .HEAD }}",
|
||||||
Repo: &Repo{
|
Git: &git{
|
||||||
HEAD: "main",
|
HEAD: "main",
|
||||||
Staging: &GitStatus{},
|
Staging: &GitStatus{},
|
||||||
Working: &GitStatus{},
|
Working: &GitStatus{},
|
||||||
|
@ -820,14 +810,11 @@ func TestGitTemplateString(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range cases {
|
for _, tc := range cases {
|
||||||
g := &git{
|
tc.Git.props = &properties{
|
||||||
props: &properties{
|
|
||||||
values: map[Property]interface{}{
|
values: map[Property]interface{}{
|
||||||
FetchStatus: true,
|
FetchStatus: true,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
Repo: tc.Repo,
|
|
||||||
}
|
}
|
||||||
assert.Equal(t, tc.Expected, g.templateString(tc.Template), tc.Case)
|
assert.Equal(t, tc.Expected, tc.Git.templateString(tc.Template), tc.Case)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"fetch_status": false,
|
"fetch_status": false,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}",
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}",
|
||||||
"prefix": " \u279C (",
|
"prefix": " \u279C (",
|
||||||
"postfix": ") "
|
"postfix": ") "
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#95ffa4",
|
"background": "#95ffa4",
|
||||||
"properties": {
|
"properties": {
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#95ffa4",
|
"background": "#95ffa4",
|
||||||
"properties": {
|
"properties": {
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#95ffa4",
|
"background": "#95ffa4",
|
||||||
"properties": {
|
"properties": {
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"foreground": "#C2C206",
|
"foreground": "#C2C206",
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,15 +50,15 @@
|
||||||
"foreground": "#000000",
|
"foreground": "#000000",
|
||||||
"background": "#00C853",
|
"background": "#00C853",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#FFEB3B{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FFEB3B{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#FFCC80{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#B388FF{{ end }}",
|
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#B388FF{{ end }}"
|
"{{ if gt .Behind 0 }}#B388FF{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"template": "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }}<#FF6F00> \uF046 {{ .Repo.Staging.String }}</>{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .HEAD }}{{ if .Staging.Changed }}<#FF6F00> \uF046 {{ .Staging.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"postfix": "",
|
"postfix": "",
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"postfix": "",
|
"postfix": "",
|
||||||
"template": "{{ .Repo.HEAD }}",
|
"template": "{{ .HEAD }}",
|
||||||
"branch_icon": ""
|
"branch_icon": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
"foreground": "#fff",
|
"foreground": "#fff",
|
||||||
"properties": {
|
"properties": {
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"template": "{{ .Repo.HEAD }}",
|
"template": "{{ .HEAD }}",
|
||||||
"prefix": " git(",
|
"prefix": " git(",
|
||||||
"postfix": ") "
|
"postfix": ") "
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}",
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}",
|
||||||
"prefix": ""
|
"prefix": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "<#CB4B16>[</>",
|
"prefix": "<#CB4B16>[</>",
|
||||||
"postfix": "<#CB4B16>]</>",
|
"postfix": "<#CB4B16>]</>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"style": "plain",
|
"style": "plain",
|
||||||
"foreground": "#F3C267",
|
"foreground": "#F3C267",
|
||||||
"properties": {
|
"properties": {
|
||||||
"template": "{{ .Repo.HEAD }}",
|
"template": "{{ .HEAD }}",
|
||||||
"branch_identical_icon": "\uF14A",
|
"branch_identical_icon": "\uF14A",
|
||||||
"branch_gone_icon": "\u274E"
|
"branch_gone_icon": "\u274E"
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "<#ffffff>\uE0B1</> ",
|
"prefix": "<#ffffff>\uE0B1</> ",
|
||||||
"postfix": " ",
|
"postfix": " ",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
"rebase_icon": "",
|
"rebase_icon": "",
|
||||||
"cherry_pick_icon": "",
|
"cherry_pick_icon": "",
|
||||||
"revert_icon": "",
|
"revert_icon": "",
|
||||||
"template": "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }}<#87FF00> ● {{ .Repo.Staging.String }}</>{{ end }}{{ if .Repo.Working.Changed }}<#D75F00> ● {{ .Repo.Working.String }}</>{{ end }}",
|
"template": "{{ .HEAD }}{{ if .Staging.Changed }}<#87FF00> ● {{ .Staging.String }}</>{{ end }}{{ if .Working.Changed }}<#D75F00> ● {{ .Working.String }}</>{{ end }}",
|
||||||
"fetch_status": true
|
"fetch_status": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
"foreground": "#B8B80A",
|
"foreground": "#B8B80A",
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "<#ffffff>on git:</>",
|
"prefix": "<#ffffff>on git:</>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -36,11 +36,11 @@
|
||||||
"foreground": "black",
|
"foreground": "black",
|
||||||
"background": "green",
|
"background": "green",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}yellow{{ end }}"
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}yellow{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"template": "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}",
|
"template": "{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}",
|
||||||
"branch_icon": " ",
|
"branch_icon": " ",
|
||||||
"branch_identical_icon": "≡",
|
"branch_identical_icon": "≡",
|
||||||
"branch_ahead_icon": "↑",
|
"branch_ahead_icon": "↑",
|
||||||
|
|
|
@ -59,15 +59,15 @@
|
||||||
"foreground": "#ffffff",
|
"foreground": "#ffffff",
|
||||||
"background": "#caffbf",
|
"background": "#caffbf",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#FCA17D{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FCA17D{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#f17c37{{ end }}"
|
"{{ if gt .Behind 0 }}#f17c37{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
"foreground": "#56B6C2",
|
"foreground": "#56B6C2",
|
||||||
"properties": {
|
"properties": {
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"template": "{{ .Repo.HEAD }}",
|
"template": "{{ .HEAD }}",
|
||||||
"prefix": "<#E8CC97>git(</>",
|
"prefix": "<#E8CC97>git(</>",
|
||||||
"postfix": "<#E8CC97>) </>"
|
"postfix": "<#E8CC97>) </>"
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,15 +52,15 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#d2ff5e",
|
"background": "#d2ff5e",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ff9248{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#f17c37{{ end }}"
|
"{{ if gt .Behind 0 }}#f17c37{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"template": "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#fffb38",
|
"background": "#fffb38",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#FF9248{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#ff4500{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#B388FF{{ end }}",
|
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#B388FF{{ end }}"
|
"{{ if gt .Behind 0 }}#B388FF{{ end }}"
|
||||||
],
|
],
|
||||||
"leading_diamond": "",
|
"leading_diamond": "",
|
||||||
"trailing_diamond": "",
|
"trailing_diamond": "",
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"branch_max_length": 25,
|
"branch_max_length": 25,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,10 +49,10 @@
|
||||||
"background": "#280C2E",
|
"background": "#280C2E",
|
||||||
"foreground": "#FFFFFF",
|
"foreground": "#FFFFFF",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#7621DE{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#7621DE{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#7621DE{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#7621DE{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#7621DE{{ end }}",
|
"{{ if gt .Ahead 0 }}#7621DE{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#7621DE{{ end }}"
|
"{{ if gt .Behind 0 }}#7621DE{{ end }}"
|
||||||
],
|
],
|
||||||
"powerline_symbol": "\uE0B0",
|
"powerline_symbol": "\uE0B0",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"prefix": " ",
|
"prefix": " ",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
},
|
},
|
||||||
"style": "powerline",
|
"style": "powerline",
|
||||||
"type": "git"
|
"type": "git"
|
||||||
|
|
|
@ -120,16 +120,16 @@
|
||||||
"foreground": "#000000",
|
"foreground": "#000000",
|
||||||
"background": "#ffffff",
|
"background": "#ffffff",
|
||||||
"foreground_templates": [
|
"foreground_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffea00{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffea00{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#2EC4B6{{ end }}",
|
"{{ if gt .Ahead 0 }}#2EC4B6{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#8A4FFF{{ end }}"
|
"{{ if gt .Behind 0 }}#8A4FFF{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"prefix": "<#000000>\ue0b1 </>",
|
"prefix": "<#000000>\ue0b1 </>",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }}<#2FDA4E> \uF046 {{ .Repo.Staging.String }}</>{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }}<#E84855> \uF044 {{ .Repo.Working.String }}</>{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if .Staging.Changed }}<#2FDA4E> \uF046 {{ .Staging.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }}<#E84855> \uF044 {{ .Working.String }}</>{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"foreground": "#ffffff",
|
"foreground": "#ffffff",
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"template": "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}",
|
"template": "{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}",
|
||||||
"postfix": ") ",
|
"postfix": ") ",
|
||||||
"prefix": " branch ("
|
"prefix": " branch ("
|
||||||
},
|
},
|
||||||
|
|
|
@ -70,16 +70,16 @@
|
||||||
"foreground": "#ffffff",
|
"foreground": "#ffffff",
|
||||||
"background": "#6f42c1",
|
"background": "#6f42c1",
|
||||||
"backround_templates": [
|
"backround_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#176f2c{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#176f2c{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#0366d6{{ end }}",
|
"{{ if gt .Ahead 0 }}#0366d6{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#f9c513{{ end }}"
|
"{{ if gt .Behind 0 }}#f9c513{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"foreground": "#B80101",
|
"foreground": "#B80101",
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": " <#F5F5F5>git:</>",
|
"prefix": " <#F5F5F5>git:</>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -23,17 +23,17 @@
|
||||||
"background": "#fee761",
|
"background": "#fee761",
|
||||||
"foreground": "#262b44",
|
"foreground": "#262b44",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#f77622{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#f77622{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#e43b44{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#e43b44{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#2ce8f5{{ end }}",
|
"{{ if gt .Ahead 0 }}#2ce8f5{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#f77622{{ end }}"
|
"{{ if gt .Behind 0 }}#f77622{{ end }}"
|
||||||
],
|
],
|
||||||
"powerline_symbol": "\uE0B0",
|
"powerline_symbol": "\uE0B0",
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
},
|
},
|
||||||
"style": "powerline",
|
"style": "powerline",
|
||||||
"type": "git"
|
"type": "git"
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"fetch_status": false,
|
"fetch_status": false,
|
||||||
"template": "{{ .Repo.HEAD }}",
|
"template": "{{ .HEAD }}",
|
||||||
"prefix": "<#5FAAE8>git:(</>",
|
"prefix": "<#5FAAE8>git:(</>",
|
||||||
"postfix": "<#5FAAE8>)</>"
|
"postfix": "<#5FAAE8>)</>"
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,16 +71,16 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#fffb38",
|
"background": "#fffb38",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ff9248{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#f17c37{{ end }}",
|
"{{ if gt .Ahead 0 }}#f17c37{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#89d1dc{{ end }}"
|
"{{ if gt .Behind 0 }}#89d1dc{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"fetch_status": false,
|
"fetch_status": false,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}",
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}",
|
||||||
"prefix": " \u279C (",
|
"prefix": " \u279C (",
|
||||||
"postfix": ") "
|
"postfix": ") "
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": ":: ",
|
"prefix": ":: ",
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"template": "{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}"
|
"template": "{{ .HEAD }}{{ .BranchStatus }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -52,16 +52,16 @@
|
||||||
"foreground": "#011627",
|
"foreground": "#011627",
|
||||||
"background": "#22da6e",
|
"background": "#22da6e",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffeb95{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#c5e478{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#c5e478{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#C792EA{{ end }}",
|
"{{ if gt .Ahead 0 }}#C792EA{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#C792EA{{ end }}"
|
"{{ if gt .Behind 0 }}#C792EA{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"branch_icon": "\ue725 ",
|
"branch_icon": "\ue725 ",
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }}<#ef5350> \uF046 {{ .Repo.Staging.String }}</>{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#ef5350> \uF046 {{ .Staging.String }}</>{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#95ffa4",
|
"background": "#95ffa4",
|
||||||
"properties": {
|
"properties": {
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#95ffa4",
|
"background": "#95ffa4",
|
||||||
"properties": {
|
"properties": {
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"prefix": "<#5FAAE8>git:(</>",
|
"prefix": "<#5FAAE8>git:(</>",
|
||||||
"postfix": "<#5FAAE8>)</>",
|
"postfix": "<#5FAAE8>)</>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
"style": "plain",
|
"style": "plain",
|
||||||
"foreground": "green",
|
"foreground": "green",
|
||||||
"foreground_templates": [
|
"foreground_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}yellow{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}yellow{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}red{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}red{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}red{{ end }}",
|
"{{ if gt .Ahead 0 }}red{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}green{{ end }}"
|
"{{ if gt .Behind 0 }}green{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
"prefix": " on ",
|
"prefix": " on ",
|
||||||
"postfix": "",
|
"postfix": "",
|
||||||
"github_icon": " ",
|
"github_icon": " ",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }}<red> \uF044 {{ .Repo.Working.String }}</>{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }}<yellow> \uF046 {{ .Repo.Staging.String }}</>{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<red> \uF044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<yellow> \uF046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -120,16 +120,16 @@
|
||||||
"foreground": "#ffea00",
|
"foreground": "#ffea00",
|
||||||
"background": "#2f2f2f",
|
"background": "#2f2f2f",
|
||||||
"foreground_templates": [
|
"foreground_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffea00{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffea00{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#2EC4B6{{ end }}",
|
"{{ if gt .Ahead 0 }}#2EC4B6{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#8A4FFF{{ end }}"
|
"{{ if gt .Behind 0 }}#8A4FFF{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"prefix": "<#ffea00>\ue0b1 </>",
|
"prefix": "<#ffea00>\ue0b1 </>",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }}<#E84855> \uF044 {{ .Repo.Working.String }}</>{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }}<#2FDA4E> \uF046 {{ .Repo.Staging.String }}</>{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#E84855> \uF044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uF046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
"background": "#546E7A",
|
"background": "#546E7A",
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "<#26C6DA>\uE0B1 </>",
|
"prefix": "<#26C6DA>\uE0B1 </>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
"foreground": "#FFE700",
|
"foreground": "#FFE700",
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
"powerline_symbol": "\uE0B4",
|
"powerline_symbol": "\uE0B4",
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": " ",
|
"prefix": " ",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -31,17 +31,17 @@
|
||||||
"foreground": "#000000",
|
"foreground": "#000000",
|
||||||
"background": "#4e9a06",
|
"background": "#4e9a06",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#c4a000{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#c4a000{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#4e9a06{{ end }}"
|
"{{ if gt .Behind 0 }}#4e9a06{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"branch_icon": "\uF126 ",
|
"branch_icon": "\uF126 ",
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#95ffa4",
|
"background": "#95ffa4",
|
||||||
"properties": {
|
"properties": {
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
"branch_ahead_icon": "<#88C0D0>\u21e1 </>",
|
"branch_ahead_icon": "<#88C0D0>\u21e1 </>",
|
||||||
"branch_behind_icon": "<#88C0D0>\u21e3 </>",
|
"branch_behind_icon": "<#88C0D0>\u21e3 </>",
|
||||||
"local_working_icon": "<#FFAFD7>\u002a</>",
|
"local_working_icon": "<#FFAFD7>\u002a</>",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"prefix": " git(",
|
"prefix": " git(",
|
||||||
"postfix": ") ",
|
"postfix": ") ",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"prefix": "<#5FAAE8>git:(</>",
|
"prefix": "<#5FAAE8>git:(</>",
|
||||||
"postfix": "<#5FAAE8>)</>",
|
"postfix": "<#5FAAE8>)</>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"prefix": "[ ",
|
"prefix": "[ ",
|
||||||
"postfix": " ]",
|
"postfix": " ]",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
"background": "#E0E0E0",
|
"background": "#E0E0E0",
|
||||||
"foreground": "#424242",
|
"foreground": "#424242",
|
||||||
"foreground_templates": [
|
"foreground_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#053F22{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#053F22{{ end }}",
|
||||||
"{{ if or (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#0A703E{{ end }}"
|
"{{ if or (gt .Ahead 0) (gt .Behind 0) }}#0A703E{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"prefix": " [",
|
"prefix": " [",
|
||||||
"postfix": "] ",
|
"postfix": "] ",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }}<#BD6200> \uF044 {{ .Repo.Working.String }}</>{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }}<#053F22> \uF046 {{ .Repo.Staging.String }}</>{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#BD6200> \uF044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#053F22> \uF046 {{ .Staging.String }}</>{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,16 +79,16 @@
|
||||||
"foreground": "#ffeb3b",
|
"foreground": "#ffeb3b",
|
||||||
"background": "#2f2f2f",
|
"background": "#2f2f2f",
|
||||||
"foreground_templates": [
|
"foreground_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffeb3b{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb3b{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#2EC4B6{{ end }}",
|
"{{ if gt .Ahead 0 }}#2EC4B6{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#8A4FFF{{ end }}"
|
"{{ if gt .Behind 0 }}#8A4FFF{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"prefix": "<#7a7a7a>\ue0b1 </>",
|
"prefix": "<#7a7a7a>\ue0b1 </>",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }}<#E84855> \uF044 {{ .Repo.Working.String }}</>{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }}<#2FDA4E> \uF046 {{ .Repo.Staging.String }}</>{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#E84855> \uF044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uF046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,16 +77,16 @@
|
||||||
"foreground": "#ffeb3b",
|
"foreground": "#ffeb3b",
|
||||||
"background": "#2f2f2f",
|
"background": "#2f2f2f",
|
||||||
"foreground_templates": [
|
"foreground_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffeb3b{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb3b{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#2EC4B6{{ end }}",
|
"{{ if gt .Ahead 0 }}#2EC4B6{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#8A4FFF{{ end }}"
|
"{{ if gt .Behind 0 }}#8A4FFF{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"prefix": "<#7a7a7a>\ue0b1 </>",
|
"prefix": "<#7a7a7a>\ue0b1 </>",
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }}<#E84855> \uF044 {{ .Repo.Working.String }}</>{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }}<#2FDA4E> \uF046 {{ .Repo.Staging.String }}</>{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}<#E84855> \uF044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#2FDA4E> \uF046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
"foreground": "#C1C106",
|
"foreground": "#C1C106",
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "<#ffffff>git:</>",
|
"prefix": "<#ffffff>git:</>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"prefix": "<#ffffff>on</> ",
|
"prefix": "<#ffffff>on</> ",
|
||||||
"template": "{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
"branch_icon": " <#ff94df><b> </b></>",
|
"branch_icon": " <#ff94df><b> </b></>",
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"prefix": "<#ffffff>on</> ",
|
"prefix": "<#ffffff>on</> ",
|
||||||
"template": "{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "<#ffffff>on</> ",
|
"prefix": "<#ffffff>on</> ",
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"template": "{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}"
|
"template": "{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,10 +69,10 @@
|
||||||
"foreground": "#100e23",
|
"foreground": "#100e23",
|
||||||
"background": "#95ffa4",
|
"background": "#95ffa4",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ff9248{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#c5b6ad{{ end }}"
|
"{{ if gt .Behind 0 }}#c5b6ad{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
"no_commits_icon": "[no commits]",
|
"no_commits_icon": "[no commits]",
|
||||||
"rebase_icon": "\u2c62 ",
|
"rebase_icon": "\u2c62 ",
|
||||||
"tag_icon": "\u25b6 ",
|
"tag_icon": "\u25b6 ",
|
||||||
"template": "{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} \u2502{{ end }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} \u2502{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
},
|
},
|
||||||
"style": "powerline",
|
"style": "powerline",
|
||||||
"type": "git"
|
"type": "git"
|
||||||
|
|
|
@ -41,16 +41,16 @@
|
||||||
"foreground": "#193549",
|
"foreground": "#193549",
|
||||||
"background": "#d2ff5e",
|
"background": "#d2ff5e",
|
||||||
"background_templates": [
|
"background_templates": [
|
||||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ff9248{{ end }}",
|
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
||||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||||
"{{ if gt .Repo.Behind 0 }}#f17c37{{ end }}"
|
"{{ if gt .Behind 0 }}#f17c37{{ end }}"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"fetch_status": true,
|
"fetch_status": true,
|
||||||
"fetch_stash_count": true,
|
"fetch_stash_count": true,
|
||||||
"fetch_upstream_icon": true,
|
"fetch_upstream_icon": true,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}{{ .Repo.BranchStatus }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}{{ if and (.Repo.Working.Changed) (.Repo.Staging.Changed) }} |{{ end }}{{ if .Repo.Staging.Changed }} \uF046 {{ .Repo.Staging.String }}{{ end }}{{ if gt .Repo.StashCount 0 }} \uF692 {{ .Repo.StashCount }}{{ end }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": ":: <lightBlue>git(</>",
|
"prefix": ":: <lightBlue>git(</>",
|
||||||
"postfix": "<lightBlue>)</>",
|
"postfix": "<lightBlue>)</>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"prefix": "HEAD:",
|
"prefix": "HEAD:",
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"fetch_upstream_icon": false,
|
"fetch_upstream_icon": false,
|
||||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}"
|
"template": "{{ .UpstreamIcon }}{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
"style": "plain",
|
"style": "plain",
|
||||||
"properties": {
|
"properties": {
|
||||||
"prefix": "<darkGray>on</> <white>git:</>",
|
"prefix": "<darkGray>on</> <white>git:</>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
"branch_icon": "",
|
"branch_icon": "",
|
||||||
"prefix": " <#DDB15F>git(</>",
|
"prefix": " <#DDB15F>git(</>",
|
||||||
"postfix": "<#DDB15F>)</>",
|
"postfix": "<#DDB15F>)</>",
|
||||||
"template": "{{ .Repo.HEAD }}"
|
"template": "{{ .HEAD }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue