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": {
|
||||
"fetch_status": 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",
|
||||
"background": "#ffeb3b",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#FFEB3B{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#FFCC80{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#B388FF{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#B388FB{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FFEB3B{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#B388FB{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_status": true,
|
||||
"fetch_stash_count": 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
|
||||
|
||||
- `.Repo.Working`: `GitStatus` - changes in the working tree (see below)
|
||||
- `.Repo.Staging`: `GitStatus` - staged changes in the work tree (see below)
|
||||
- `.Repo.HEAD`: `string` - the current HEAD context (branch/rebase/merge/...)
|
||||
- `.Repo.Behind`: `int` - commits behind of upstream
|
||||
- `.Repo.Ahead`: `int` - commits ahead of upstream
|
||||
- `.Repo.BranchStatus`: `string` - the current branch context (ahead/behind string representation)
|
||||
- `.Repo.Upstream`: `string` - the upstream name (remote)
|
||||
- `.Repo.UpstreamIcon`: `string` - the upstream icon (based on the icons above)
|
||||
- `.Repo.StashCount`: `int` - the stash count
|
||||
- `.Repo.WorktreeCount`: `int` - the worktree count
|
||||
- `.Repo.IsWorkTree`: `boolean` - if in a worktree repo or not
|
||||
- `.Working`: `GitStatus` - changes in the working tree (see below)
|
||||
- `.Staging`: `GitStatus` - staged changes in the work tree (see below)
|
||||
- `.HEAD`: `string` - the current HEAD context (branch/rebase/merge/...)
|
||||
- `.Behind`: `int` - commits behind of upstream
|
||||
- `.Ahead`: `int` - commits ahead of upstream
|
||||
- `.BranchStatus`: `string` - the current branch context (ahead/behind string representation)
|
||||
- `.Upstream`: `string` - the upstream name (remote)
|
||||
- `.UpstreamIcon`: `string` - the upstream icon (based on the icons above)
|
||||
- `.StashCount`: `int` - the stash count
|
||||
- `.WorktreeCount`: `int` - the worktree count
|
||||
- `.IsWorkTree`: `boolean` - if in a worktree repo or not
|
||||
|
||||
### GitStatus
|
||||
|
||||
|
|
|
@ -8,24 +8,6 @@ import (
|
|||
"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
|
||||
type GitStatus struct {
|
||||
Unmerged int
|
||||
|
@ -83,7 +65,21 @@ func (s *GitStatus) String() string {
|
|||
type git struct {
|
||||
props *properties
|
||||
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 (
|
||||
|
@ -146,28 +142,27 @@ func (g *git) enabled() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
g.Repo = &Repo{
|
||||
Staging: &GitStatus{},
|
||||
Working: &GitStatus{},
|
||||
}
|
||||
g.Staging = &GitStatus{}
|
||||
g.Working = &GitStatus{}
|
||||
|
||||
if gitdir.isDir {
|
||||
g.Repo.gitWorkingFolder = gitdir.path
|
||||
g.Repo.gitRootFolder = gitdir.path
|
||||
g.gitWorkingFolder = gitdir.path
|
||||
g.gitRootFolder = gitdir.path
|
||||
return true
|
||||
}
|
||||
// handle worktree
|
||||
g.Repo.gitRootFolder = gitdir.path
|
||||
g.gitRootFolder = gitdir.path
|
||||
dirPointer := g.env.getFileContent(gitdir.path)
|
||||
dirPointer = strings.Trim(dirPointer, " \r\n")
|
||||
matches := findNamedRegexMatch(`^gitdir: (?P<dir>.*)$`, dirPointer)
|
||||
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
|
||||
// strips the last .git/worktrees part
|
||||
// :ind+5 = index + /.git
|
||||
ind := strings.LastIndex(g.Repo.gitWorkingFolder, "/.git/worktrees")
|
||||
g.Repo.gitRootFolder = g.Repo.gitWorkingFolder[:ind+5]
|
||||
g.Repo.IsWorkTree = true
|
||||
ind := strings.LastIndex(g.gitWorkingFolder, "/.git/worktrees")
|
||||
g.gitRootFolder = g.gitWorkingFolder[:ind+5]
|
||||
g.IsWorkTree = true
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
@ -189,19 +184,19 @@ func (g *git) string() string {
|
|||
statusColorsEnabled := g.props.getBool(StatusColorsEnabled, false)
|
||||
displayStatus := g.getBool(FetchStatus, DisplayStatus)
|
||||
if !displayStatus {
|
||||
g.Repo.HEAD = g.getPrettyHEADName()
|
||||
g.HEAD = g.getPrettyHEADName()
|
||||
}
|
||||
if displayStatus || statusColorsEnabled {
|
||||
g.setGitStatus()
|
||||
}
|
||||
if g.Repo.Upstream != "" && g.getBool(FetchUpstreamIcon, DisplayUpstreamIcon) {
|
||||
g.Repo.UpstreamIcon = g.getUpstreamIcon()
|
||||
if g.Upstream != "" && g.getBool(FetchUpstreamIcon, DisplayUpstreamIcon) {
|
||||
g.UpstreamIcon = g.getUpstreamIcon()
|
||||
}
|
||||
if g.getBool(FetchStashCount, DisplayStashCount) {
|
||||
g.Repo.StashCount = g.getStashContext()
|
||||
g.StashCount = g.getStashContext()
|
||||
}
|
||||
if g.getBool(FetchWorktreeCount, DisplayWorktreeCount) {
|
||||
g.Repo.WorktreeCount = g.getWorktreeContext()
|
||||
g.WorktreeCount = g.getWorktreeContext()
|
||||
}
|
||||
// use template if available
|
||||
segmentTemplate := g.props.getString(SegmentTemplate, "")
|
||||
|
@ -232,26 +227,26 @@ func (g *git) init(props *properties, env environmentInfo) {
|
|||
}
|
||||
|
||||
func (g *git) getBranchStatus() string {
|
||||
if g.Repo.Ahead > 0 && g.Repo.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)
|
||||
if g.Ahead > 0 && g.Behind > 0 {
|
||||
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 {
|
||||
return fmt.Sprintf(" %s%d", g.props.getString(BranchAheadIcon, "\u2191"), g.Repo.Ahead)
|
||||
if g.Ahead > 0 {
|
||||
return fmt.Sprintf(" %s%d", g.props.getString(BranchAheadIcon, "\u2191"), g.Ahead)
|
||||
}
|
||||
if g.Repo.Behind > 0 {
|
||||
return fmt.Sprintf(" %s%d", g.props.getString(BranchBehindIcon, "\u2193"), g.Repo.Behind)
|
||||
if g.Behind > 0 {
|
||||
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"))
|
||||
}
|
||||
if g.Repo.Upstream == "" {
|
||||
if g.Upstream == "" {
|
||||
return fmt.Sprintf(" %s", g.props.getString(BranchGoneIcon, "\u2262"))
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (g *git) getUpstreamIcon() string {
|
||||
upstream := replaceAllString("/.*", g.Repo.Upstream, "")
|
||||
upstream := replaceAllString("/.*", g.Upstream, "")
|
||||
url := g.getOriginURL(upstream)
|
||||
if strings.Contains(url, "github") {
|
||||
return g.props.getString(GithubIcon, "\uF408 ")
|
||||
|
@ -271,18 +266,18 @@ func (g *git) getUpstreamIcon() string {
|
|||
func (g *git) setGitStatus() {
|
||||
output := g.getGitCommandOutput("status", "-unormal", "--short", "--branch")
|
||||
splittedOutput := strings.Split(output, "\n")
|
||||
g.Repo.Working.parse(splittedOutput, true)
|
||||
g.Repo.Staging.parse(splittedOutput, false)
|
||||
g.Working.parse(splittedOutput, true)
|
||||
g.Staging.parse(splittedOutput, false)
|
||||
status := g.parseGitStatusInfo(splittedOutput[0])
|
||||
if status["local"] != "" {
|
||||
g.Repo.Ahead, _ = strconv.Atoi(status["ahead"])
|
||||
g.Repo.Behind, _ = strconv.Atoi(status["behind"])
|
||||
g.Ahead, _ = strconv.Atoi(status["ahead"])
|
||||
g.Behind, _ = strconv.Atoi(status["behind"])
|
||||
if status["upstream_status"] != "gone" {
|
||||
g.Repo.Upstream = status["upstream"]
|
||||
g.Upstream = status["upstream"]
|
||||
}
|
||||
}
|
||||
g.Repo.HEAD = g.getGitHEADContext(status["local"])
|
||||
g.Repo.BranchStatus = g.getBranchStatus()
|
||||
g.HEAD = g.getGitHEADContext(status["local"])
|
||||
g.BranchStatus = g.getBranchStatus()
|
||||
}
|
||||
|
||||
func (g *git) getGitCommand() string {
|
||||
|
@ -297,7 +292,7 @@ func (g *git) getGitCommand() 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...)
|
||||
return val
|
||||
}
|
||||
|
@ -311,30 +306,30 @@ func (g *git) getGitHEADContext(ref string) string {
|
|||
ref = fmt.Sprintf("%s%s", branchIcon, ref)
|
||||
}
|
||||
// rebase
|
||||
if g.env.hasFolder(g.Repo.gitWorkingFolder + "/rebase-merge") {
|
||||
head := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-merge/head-name")
|
||||
if g.env.hasFolder(g.gitWorkingFolder + "/rebase-merge") {
|
||||
head := g.getGitFileContents(g.gitWorkingFolder, "rebase-merge/head-name")
|
||||
origin := strings.Replace(head, "refs/heads/", "", 1)
|
||||
origin = g.truncateBranch(origin)
|
||||
onto := g.getGitRefFileSymbolicName("rebase-merge/onto")
|
||||
onto = g.truncateBranch(onto)
|
||||
step := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-merge/msgnum")
|
||||
total := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-merge/end")
|
||||
step := g.getGitFileContents(g.gitWorkingFolder, "rebase-merge/msgnum")
|
||||
total := g.getGitFileContents(g.gitWorkingFolder, "rebase-merge/end")
|
||||
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)
|
||||
}
|
||||
if g.env.hasFolder(g.Repo.gitWorkingFolder + "/rebase-apply") {
|
||||
head := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-apply/head-name")
|
||||
if g.env.hasFolder(g.gitWorkingFolder + "/rebase-apply") {
|
||||
head := g.getGitFileContents(g.gitWorkingFolder, "rebase-apply/head-name")
|
||||
origin := strings.Replace(head, "refs/heads/", "", 1)
|
||||
origin = g.truncateBranch(origin)
|
||||
step := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-apply/next")
|
||||
total := g.getGitFileContents(g.Repo.gitWorkingFolder, "rebase-apply/last")
|
||||
step := g.getGitFileContents(g.gitWorkingFolder, "rebase-apply/next")
|
||||
total := g.getGitFileContents(g.gitWorkingFolder, "rebase-apply/last")
|
||||
icon := g.props.getString(RebaseIcon, "\uE728 ")
|
||||
return fmt.Sprintf("%s%s%s (%s/%s) at %s", icon, branchIcon, origin, step, total, ref)
|
||||
}
|
||||
// merge
|
||||
if g.hasGitFile("MERGE_MSG") && g.hasGitFile("MERGE_HEAD") {
|
||||
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)
|
||||
|
||||
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
|
||||
// the todo file.
|
||||
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 ")
|
||||
return fmt.Sprintf("%s%s onto %s", icon, sha[0:6], ref)
|
||||
} 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 ")
|
||||
return fmt.Sprintf("%s%s onto %s", icon, sha[0:6], ref)
|
||||
} 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)
|
||||
if matches != nil && matches["sha"] != "" {
|
||||
action := matches["action"]
|
||||
|
@ -392,7 +387,7 @@ func (g *git) truncateBranch(branch string) string {
|
|||
}
|
||||
|
||||
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 {
|
||||
|
@ -400,13 +395,13 @@ func (g *git) getGitFileContents(folder, file 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)
|
||||
}
|
||||
|
||||
func (g *git) getPrettyHEADName() string {
|
||||
var ref string
|
||||
HEAD := g.getGitFileContents(g.Repo.gitWorkingFolder, "HEAD")
|
||||
HEAD := g.getGitFileContents(g.gitWorkingFolder, "HEAD")
|
||||
branchPrefix := "ref: refs/heads/"
|
||||
if strings.HasPrefix(HEAD, branchPrefix) {
|
||||
ref = strings.TrimPrefix(HEAD, branchPrefix)
|
||||
|
@ -429,7 +424,7 @@ func (g *git) getPrettyHEADName() string {
|
|||
}
|
||||
|
||||
func (g *git) getStashContext() int {
|
||||
stashContent := g.getGitFileContents(g.Repo.gitRootFolder, "logs/refs/stash")
|
||||
stashContent := g.getGitFileContents(g.gitRootFolder, "logs/refs/stash")
|
||||
if stashContent == "" {
|
||||
return 0
|
||||
}
|
||||
|
@ -438,10 +433,10 @@ func (g *git) getStashContext() int {
|
|||
}
|
||||
|
||||
func (g *git) getWorktreeContext() int {
|
||||
if !g.env.hasFolder(g.Repo.gitRootFolder + "/worktrees") {
|
||||
if !g.env.hasFolder(g.gitRootFolder + "/worktrees") {
|
||||
return 0
|
||||
}
|
||||
worktreeFolders := g.env.getFoldersList(g.Repo.gitRootFolder + "/worktrees")
|
||||
worktreeFolders := g.env.getFoldersList(g.gitRootFolder + "/worktrees")
|
||||
return len(worktreeFolders)
|
||||
}
|
||||
|
||||
|
@ -451,7 +446,7 @@ func (g *git) parseGitStatusInfo(branchInfo string) map[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 {
|
||||
return g.getGitCommandOutput("remote", "get-url", upstream)
|
||||
}
|
||||
|
|
|
@ -58,28 +58,28 @@ func (g *git) renderDeprecatedString(statusColorsEnabled bool) string {
|
|||
}
|
||||
buffer := new(bytes.Buffer)
|
||||
// remote (if available)
|
||||
if len(g.Repo.UpstreamIcon) != 0 {
|
||||
fmt.Fprintf(buffer, "%s", g.Repo.UpstreamIcon)
|
||||
if len(g.UpstreamIcon) != 0 {
|
||||
fmt.Fprintf(buffer, "%s", g.UpstreamIcon)
|
||||
}
|
||||
// branchName
|
||||
fmt.Fprintf(buffer, "%s", g.Repo.HEAD)
|
||||
if len(g.Repo.BranchStatus) > 0 {
|
||||
buffer.WriteString(g.Repo.BranchStatus)
|
||||
fmt.Fprintf(buffer, "%s", g.HEAD)
|
||||
if len(g.BranchStatus) > 0 {
|
||||
buffer.WriteString(g.BranchStatus)
|
||||
}
|
||||
if g.Repo.Staging.Changed {
|
||||
fmt.Fprint(buffer, g.getStatusDetailString(g.Repo.Staging, StagingColor, LocalStagingIcon, " \uF046"))
|
||||
if g.Staging.Changed {
|
||||
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, " |"))
|
||||
}
|
||||
if g.Repo.Working.Changed {
|
||||
fmt.Fprint(buffer, g.getStatusDetailString(g.Repo.Working, WorkingColor, LocalWorkingIcon, " \uF044"))
|
||||
if g.Working.Changed {
|
||||
fmt.Fprint(buffer, g.getStatusDetailString(g.Working, WorkingColor, LocalWorkingIcon, " \uF044"))
|
||||
}
|
||||
if g.Repo.StashCount != 0 {
|
||||
fmt.Fprintf(buffer, " %s%d", g.props.getString(StashCountIcon, "\uF692 "), g.Repo.StashCount)
|
||||
if g.StashCount != 0 {
|
||||
fmt.Fprintf(buffer, " %s%d", g.props.getString(StashCountIcon, "\uF692 "), g.StashCount)
|
||||
}
|
||||
if g.Repo.WorktreeCount != 0 {
|
||||
fmt.Fprintf(buffer, " %s%d", g.props.getString(WorktreeCountIcon, "\uf1bb "), g.Repo.WorktreeCount)
|
||||
if g.WorktreeCount != 0 {
|
||||
fmt.Fprintf(buffer, " %s%d", g.props.getString(WorktreeCountIcon, "\uf1bb "), g.WorktreeCount)
|
||||
}
|
||||
return buffer.String()
|
||||
}
|
||||
|
@ -93,13 +93,13 @@ func (g *git) SetStatusColor() {
|
|||
}
|
||||
|
||||
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)
|
||||
} else if g.Repo.Ahead > 0 && g.Repo.Behind > 0 {
|
||||
} else if g.Ahead > 0 && g.Behind > 0 {
|
||||
return g.props.getColor(AheadAndBehindColor, defaultValue)
|
||||
} else if g.Repo.Ahead > 0 {
|
||||
} else if g.Ahead > 0 {
|
||||
return g.props.getColor(AheadColor, defaultValue)
|
||||
} else if g.Repo.Behind > 0 {
|
||||
} else if g.Behind > 0 {
|
||||
return g.props.getColor(BehindColor, defaultValue)
|
||||
}
|
||||
return defaultValue
|
||||
|
|
|
@ -110,32 +110,26 @@ func TestGetStatusDetailStringNoStatusColorOverride(t *testing.T) {
|
|||
|
||||
func TestGetStatusColorLocalChangesStaging(t *testing.T) {
|
||||
expected := changesColor
|
||||
repo := &Repo{
|
||||
Staging: &GitStatus{
|
||||
Changed: true,
|
||||
},
|
||||
}
|
||||
g := &git{
|
||||
Repo: repo,
|
||||
props: &properties{
|
||||
values: map[Property]interface{}{
|
||||
LocalChangesColor: expected,
|
||||
},
|
||||
},
|
||||
Staging: &GitStatus{
|
||||
Changed: true,
|
||||
},
|
||||
}
|
||||
assert.Equal(t, expected, g.getStatusColor("#fg1111"))
|
||||
}
|
||||
|
||||
func TestGetStatusColorLocalChangesWorking(t *testing.T) {
|
||||
expected := changesColor
|
||||
repo := &Repo{
|
||||
g := &git{
|
||||
Staging: &GitStatus{},
|
||||
Working: &GitStatus{
|
||||
Changed: true,
|
||||
},
|
||||
}
|
||||
g := &git{
|
||||
Repo: repo,
|
||||
props: &properties{
|
||||
values: map[Property]interface{}{
|
||||
LocalChangesColor: expected,
|
||||
|
@ -147,14 +141,11 @@ func TestGetStatusColorLocalChangesWorking(t *testing.T) {
|
|||
|
||||
func TestGetStatusColorAheadAndBehind(t *testing.T) {
|
||||
expected := changesColor
|
||||
repo := &Repo{
|
||||
g := &git{
|
||||
Staging: &GitStatus{},
|
||||
Working: &GitStatus{},
|
||||
Ahead: 1,
|
||||
Behind: 3,
|
||||
}
|
||||
g := &git{
|
||||
Repo: repo,
|
||||
props: &properties{
|
||||
values: map[Property]interface{}{
|
||||
AheadAndBehindColor: expected,
|
||||
|
@ -166,14 +157,11 @@ func TestGetStatusColorAheadAndBehind(t *testing.T) {
|
|||
|
||||
func TestGetStatusColorAhead(t *testing.T) {
|
||||
expected := changesColor
|
||||
repo := &Repo{
|
||||
g := &git{
|
||||
Staging: &GitStatus{},
|
||||
Working: &GitStatus{},
|
||||
Ahead: 1,
|
||||
Behind: 0,
|
||||
}
|
||||
g := &git{
|
||||
Repo: repo,
|
||||
props: &properties{
|
||||
values: map[Property]interface{}{
|
||||
AheadColor: expected,
|
||||
|
@ -185,14 +173,11 @@ func TestGetStatusColorAhead(t *testing.T) {
|
|||
|
||||
func TestGetStatusColorBehind(t *testing.T) {
|
||||
expected := changesColor
|
||||
repo := &Repo{
|
||||
g := &git{
|
||||
Staging: &GitStatus{},
|
||||
Working: &GitStatus{},
|
||||
Ahead: 0,
|
||||
Behind: 5,
|
||||
}
|
||||
g := &git{
|
||||
Repo: repo,
|
||||
props: &properties{
|
||||
values: map[Property]interface{}{
|
||||
BehindColor: expected,
|
||||
|
@ -204,14 +189,11 @@ func TestGetStatusColorBehind(t *testing.T) {
|
|||
|
||||
func TestGetStatusColorDefault(t *testing.T) {
|
||||
expected := changesColor
|
||||
repo := &Repo{
|
||||
g := &git{
|
||||
Staging: &GitStatus{},
|
||||
Working: &GitStatus{},
|
||||
Ahead: 0,
|
||||
Behind: 0,
|
||||
}
|
||||
g := &git{
|
||||
Repo: repo,
|
||||
props: &properties{
|
||||
values: map[Property]interface{}{
|
||||
BehindColor: changesColor,
|
||||
|
@ -223,13 +205,10 @@ func TestGetStatusColorDefault(t *testing.T) {
|
|||
|
||||
func TestSetStatusColorForeground(t *testing.T) {
|
||||
expected := changesColor
|
||||
repo := &Repo{
|
||||
g := &git{
|
||||
Staging: &GitStatus{
|
||||
Changed: true,
|
||||
},
|
||||
}
|
||||
g := &git{
|
||||
Repo: repo,
|
||||
props: &properties{
|
||||
values: map[Property]interface{}{
|
||||
LocalChangesColor: changesColor,
|
||||
|
@ -245,13 +224,10 @@ func TestSetStatusColorForeground(t *testing.T) {
|
|||
|
||||
func TestSetStatusColorBackground(t *testing.T) {
|
||||
expected := changesColor
|
||||
repo := &Repo{
|
||||
g := &git{
|
||||
Staging: &GitStatus{
|
||||
Changed: true,
|
||||
},
|
||||
}
|
||||
g := &git{
|
||||
Repo: repo,
|
||||
props: &properties{
|
||||
values: map[Property]interface{}{
|
||||
LocalChangesColor: changesColor,
|
||||
|
|
|
@ -37,7 +37,7 @@ func TestEnabledInWorkingDirectory(t *testing.T) {
|
|||
env: env,
|
||||
}
|
||||
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) {
|
||||
|
@ -56,7 +56,7 @@ func TestEnabledInWorkingTree(t *testing.T) {
|
|||
env: env,
|
||||
}
|
||||
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) {
|
||||
|
@ -68,10 +68,8 @@ func TestGetGitOutputForCommand(t *testing.T) {
|
|||
env.On("runCommand", "git", append(args, commandArgs...)).Return(want, nil)
|
||||
env.On("getRuntimeGOOS", nil).Return("unix")
|
||||
g := &git{
|
||||
env: env,
|
||||
Repo: &Repo{
|
||||
gitRootFolder: "test",
|
||||
},
|
||||
env: env,
|
||||
gitRootFolder: "test",
|
||||
}
|
||||
got := g.getGitCommandOutput(commandArgs...)
|
||||
assert.Equal(t, want, got)
|
||||
|
@ -131,12 +129,10 @@ func setupHEADContextEnv(context *detachedContext) *git {
|
|||
env.mockGitCommand(context.status, "status", "-unormal", "--short", "--branch")
|
||||
env.On("getRuntimeGOOS", nil).Return("unix")
|
||||
g := &git{
|
||||
env: env,
|
||||
Repo: &Repo{
|
||||
gitWorkingFolder: "",
|
||||
Working: &GitStatus{},
|
||||
Staging: &GitStatus{},
|
||||
},
|
||||
env: env,
|
||||
gitWorkingFolder: "",
|
||||
Working: &GitStatus{},
|
||||
Staging: &GitStatus{},
|
||||
}
|
||||
return g
|
||||
}
|
||||
|
@ -387,10 +383,8 @@ func TestGetStashContextZeroEntries(t *testing.T) {
|
|||
env := new(MockedEnvironment)
|
||||
env.On("getFileContent", "/logs/refs/stash").Return(tc.StashContent)
|
||||
g := &git{
|
||||
Repo: &Repo{
|
||||
gitWorkingFolder: "",
|
||||
},
|
||||
env: env,
|
||||
env: env,
|
||||
gitWorkingFolder: "",
|
||||
}
|
||||
got := g.getStashContext()
|
||||
assert.Equal(t, tc.Expected, got)
|
||||
|
@ -569,11 +563,9 @@ func TestGitUpstream(t *testing.T) {
|
|||
},
|
||||
}
|
||||
g := &git{
|
||||
env: env,
|
||||
Repo: &Repo{
|
||||
Upstream: "origin/main",
|
||||
},
|
||||
props: props,
|
||||
env: env,
|
||||
props: props,
|
||||
Upstream: "origin/main",
|
||||
}
|
||||
upstreamIcon := g.getUpstreamIcon()
|
||||
assert.Equal(t, tc.Expected, upstreamIcon, tc.Case)
|
||||
|
@ -606,11 +598,9 @@ func TestGetBranchStatus(t *testing.T) {
|
|||
BranchGoneIcon: "gone",
|
||||
},
|
||||
},
|
||||
Repo: &Repo{
|
||||
Ahead: tc.Ahead,
|
||||
Behind: tc.Behind,
|
||||
Upstream: tc.Upstream,
|
||||
},
|
||||
Ahead: tc.Ahead,
|
||||
Behind: tc.Behind,
|
||||
Upstream: tc.Upstream,
|
||||
}
|
||||
assert.Equal(t, tc.Expected, g.getBranchStatus(), tc.Case)
|
||||
}
|
||||
|
@ -706,13 +696,13 @@ func TestGitTemplateString(t *testing.T) {
|
|||
Case string
|
||||
Expected string
|
||||
Template string
|
||||
Repo *Repo
|
||||
Git *git
|
||||
}{
|
||||
{
|
||||
Case: "Only HEAD name",
|
||||
Expected: "main",
|
||||
Template: "{{ .Repo.HEAD }}",
|
||||
Repo: &Repo{
|
||||
Template: "{{ .HEAD }}",
|
||||
Git: &git{
|
||||
HEAD: "main",
|
||||
Behind: 2,
|
||||
},
|
||||
|
@ -720,8 +710,8 @@ func TestGitTemplateString(t *testing.T) {
|
|||
{
|
||||
Case: "Working area changes",
|
||||
Expected: "main \uF044 +2 ~3",
|
||||
Template: "{{ .Repo.HEAD }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}",
|
||||
Repo: &Repo{
|
||||
Template: "{{ .HEAD }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}",
|
||||
Git: &git{
|
||||
HEAD: "main",
|
||||
Working: &GitStatus{
|
||||
Added: 2,
|
||||
|
@ -733,8 +723,8 @@ func TestGitTemplateString(t *testing.T) {
|
|||
{
|
||||
Case: "No working area changes",
|
||||
Expected: "main",
|
||||
Template: "{{ .Repo.HEAD }}{{ if .Repo.Working.Changed }} \uF044 {{ .Repo.Working.String }}{{ end }}",
|
||||
Repo: &Repo{
|
||||
Template: "{{ .HEAD }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}",
|
||||
Git: &git{
|
||||
HEAD: "main",
|
||||
Working: &GitStatus{
|
||||
Changed: false,
|
||||
|
@ -744,8 +734,8 @@ func TestGitTemplateString(t *testing.T) {
|
|||
{
|
||||
Case: "Working and staging area changes",
|
||||
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 }}",
|
||||
Repo: &Repo{
|
||||
Template: "{{ .HEAD }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}",
|
||||
Git: &git{
|
||||
HEAD: "main",
|
||||
Working: &GitStatus{
|
||||
Added: 2,
|
||||
|
@ -762,8 +752,8 @@ func TestGitTemplateString(t *testing.T) {
|
|||
{
|
||||
Case: "Working and staging area changes with separator",
|
||||
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
|
||||
Repo: &Repo{
|
||||
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
|
||||
Git: &git{
|
||||
HEAD: "main",
|
||||
Working: &GitStatus{
|
||||
Added: 2,
|
||||
|
@ -780,8 +770,8 @@ func TestGitTemplateString(t *testing.T) {
|
|||
{
|
||||
Case: "Working and staging area changes with separator and stash count",
|
||||
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
|
||||
Repo: &Repo{
|
||||
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
|
||||
Git: &git{
|
||||
HEAD: "main",
|
||||
Working: &GitStatus{
|
||||
Added: 2,
|
||||
|
@ -799,8 +789,8 @@ func TestGitTemplateString(t *testing.T) {
|
|||
{
|
||||
Case: "No local changes",
|
||||
Expected: "main",
|
||||
Template: "{{ .Repo.HEAD }}{{ if .Repo.Staging.Changed }} \uF046{{ .Repo.Staging.String }}{{ end }}{{ if .Repo.Working.Changed }} \uF044{{ .Repo.Working.String }}{{ end }}",
|
||||
Repo: &Repo{
|
||||
Template: "{{ .HEAD }}{{ if .Staging.Changed }} \uF046{{ .Staging.String }}{{ end }}{{ if .Working.Changed }} \uF044{{ .Working.String }}{{ end }}",
|
||||
Git: &git{
|
||||
HEAD: "main",
|
||||
Staging: &GitStatus{},
|
||||
Working: &GitStatus{},
|
||||
|
@ -809,8 +799,8 @@ func TestGitTemplateString(t *testing.T) {
|
|||
{
|
||||
Case: "Upstream Icon",
|
||||
Expected: "from GitHub on main",
|
||||
Template: "from {{ .Repo.UpstreamIcon }} on {{ .Repo.HEAD }}",
|
||||
Repo: &Repo{
|
||||
Template: "from {{ .UpstreamIcon }} on {{ .HEAD }}",
|
||||
Git: &git{
|
||||
HEAD: "main",
|
||||
Staging: &GitStatus{},
|
||||
Working: &GitStatus{},
|
||||
|
@ -820,14 +810,11 @@ func TestGitTemplateString(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
g := &git{
|
||||
props: &properties{
|
||||
values: map[Property]interface{}{
|
||||
FetchStatus: true,
|
||||
},
|
||||
tc.Git.props = &properties{
|
||||
values: map[Property]interface{}{
|
||||
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,
|
||||
"branch_icon": "",
|
||||
"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 (",
|
||||
"postfix": ") "
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"foreground": "#193549",
|
||||
"background": "#95ffa4",
|
||||
"properties": {
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
"foreground": "#193549",
|
||||
"background": "#95ffa4",
|
||||
"properties": {
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"foreground": "#193549",
|
||||
"background": "#95ffa4",
|
||||
"properties": {
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"fetch_stash_count": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"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",
|
||||
"properties": {
|
||||
"prefix": "",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -50,15 +50,15 @@
|
|||
"foreground": "#000000",
|
||||
"background": "#00C853",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#FFEB3B{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#FFCC80{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#B388FF{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#B388FF{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FFEB3B{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#B388FF{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_stash_count": 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": {
|
||||
"fetch_stash_count": 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": "",
|
||||
"postfix": "",
|
||||
"branch_icon": "",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"properties": {
|
||||
"prefix": "",
|
||||
"postfix": "",
|
||||
"template": "{{ .Repo.HEAD }}",
|
||||
"template": "{{ .HEAD }}",
|
||||
"branch_icon": ""
|
||||
}
|
||||
},
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
"foreground": "#fff",
|
||||
"properties": {
|
||||
"branch_icon": "",
|
||||
"template": "{{ .Repo.HEAD }}",
|
||||
"template": "{{ .HEAD }}",
|
||||
"prefix": " git(",
|
||||
"postfix": ") "
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"properties": {
|
||||
"fetch_upstream_icon": true,
|
||||
"branch_icon": "",
|
||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}"
|
||||
"template": "{{ .UpstreamIcon }}{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
"fetch_status": true,
|
||||
"fetch_stash_count": 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": ""
|
||||
}
|
||||
},
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"properties": {
|
||||
"prefix": "<#CB4B16>[</>",
|
||||
"postfix": "<#CB4B16>]</>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"style": "plain",
|
||||
"foreground": "#F3C267",
|
||||
"properties": {
|
||||
"template": "{{ .Repo.HEAD }}",
|
||||
"template": "{{ .HEAD }}",
|
||||
"branch_identical_icon": "\uF14A",
|
||||
"branch_gone_icon": "\u274E"
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
"properties": {
|
||||
"prefix": "<#ffffff>\uE0B1</> ",
|
||||
"postfix": " ",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"properties": {
|
||||
"fetch_stash_count": 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": "",
|
||||
"cherry_pick_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
|
||||
}
|
||||
},
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"foreground": "#B8B80A",
|
||||
"properties": {
|
||||
"prefix": "<#ffffff>on git:</>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -36,11 +36,11 @@
|
|||
"foreground": "black",
|
||||
"background": "green",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}yellow{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}yellow{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"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_identical_icon": "≡",
|
||||
"branch_ahead_icon": "↑",
|
||||
|
|
|
@ -59,15 +59,15 @@
|
|||
"foreground": "#ffffff",
|
||||
"background": "#caffbf",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#FCA17D{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#f17c37{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FCA17D{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#f17c37{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_upstream_icon": 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",
|
||||
"properties": {
|
||||
"branch_icon": "",
|
||||
"template": "{{ .Repo.HEAD }}",
|
||||
"template": "{{ .HEAD }}",
|
||||
"prefix": "<#E8CC97>git(</>",
|
||||
"postfix": "<#E8CC97>) </>"
|
||||
}
|
||||
|
|
|
@ -52,15 +52,15 @@
|
|||
"foreground": "#193549",
|
||||
"background": "#d2ff5e",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ff9248{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#f17c37{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#f17c37{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_status": 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",
|
||||
"background": "#fffb38",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#FF9248{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#ff4500{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#B388FF{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#B388FF{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#B388FF{{ end }}"
|
||||
],
|
||||
"leading_diamond": "",
|
||||
"trailing_diamond": "",
|
||||
|
@ -48,7 +48,7 @@
|
|||
"fetch_stash_count": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"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",
|
||||
"foreground": "#FFFFFF",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#7621DE{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#7621DE{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#7621DE{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#7621DE{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#7621DE{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#7621DE{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#7621DE{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#7621DE{{ end }}"
|
||||
],
|
||||
"powerline_symbol": "\uE0B0",
|
||||
"properties": {
|
||||
|
@ -60,7 +60,7 @@
|
|||
"fetch_status": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"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",
|
||||
"type": "git"
|
||||
|
|
|
@ -120,16 +120,16 @@
|
|||
"foreground": "#000000",
|
||||
"background": "#ffffff",
|
||||
"foreground_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffea00{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#2EC4B6{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#8A4FFF{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffea00{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#2EC4B6{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#8A4FFF{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_stash_count": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"fetch_status": true,
|
||||
"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",
|
||||
"properties": {
|
||||
"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": ") ",
|
||||
"prefix": " branch ("
|
||||
},
|
||||
|
|
|
@ -70,16 +70,16 @@
|
|||
"foreground": "#ffffff",
|
||||
"background": "#6f42c1",
|
||||
"backround_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#176f2c{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#0366d6{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#f9c513{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#176f2c{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#0366d6{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#f9c513{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_stash_count": true,
|
||||
"fetch_status": 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",
|
||||
"properties": {
|
||||
"prefix": " <#F5F5F5>git:</>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -23,17 +23,17 @@
|
|||
"background": "#fee761",
|
||||
"foreground": "#262b44",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#f77622{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#e43b44{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#2ce8f5{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#f77622{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#f77622{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#e43b44{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#2ce8f5{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#f77622{{ end }}"
|
||||
],
|
||||
"powerline_symbol": "\uE0B0",
|
||||
"properties": {
|
||||
"fetch_status": true,
|
||||
"fetch_stash_count": 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",
|
||||
"type": "git"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"properties": {
|
||||
"branch_icon": "",
|
||||
"fetch_status": false,
|
||||
"template": "{{ .Repo.HEAD }}",
|
||||
"template": "{{ .HEAD }}",
|
||||
"prefix": "<#5FAAE8>git:(</>",
|
||||
"postfix": "<#5FAAE8>)</>"
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
"fetch_stash_count": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"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",
|
||||
"background": "#fffb38",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ff9248{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#f17c37{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#89d1dc{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#f17c37{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#89d1dc{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_status": true,
|
||||
"fetch_stash_count": 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_upstream_icon": true,
|
||||
"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 (",
|
||||
"postfix": ") "
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"properties": {
|
||||
"prefix": ":: ",
|
||||
"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",
|
||||
"background": "#22da6e",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffeb95{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#c5e478{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#C792EA{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#C792EA{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#c5e478{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#C792EA{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#C792EA{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"branch_icon": "\ue725 ",
|
||||
"fetch_status": 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",
|
||||
"background": "#95ffa4",
|
||||
"properties": {
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"foreground": "#193549",
|
||||
"background": "#95ffa4",
|
||||
"properties": {
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"branch_icon": "",
|
||||
"prefix": "<#5FAAE8>git:(</>",
|
||||
"postfix": "<#5FAAE8>)</>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
"style": "plain",
|
||||
"foreground": "green",
|
||||
"foreground_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}yellow{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}red{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}red{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}green{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}yellow{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}red{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}red{{ end }}",
|
||||
"{{ if gt .Behind 0 }}green{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_status": true,
|
||||
|
@ -48,7 +48,7 @@
|
|||
"prefix": " on ",
|
||||
"postfix": "",
|
||||
"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",
|
||||
"background": "#2f2f2f",
|
||||
"foreground_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffea00{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#2EC4B6{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#8A4FFF{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffea00{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#2EC4B6{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#8A4FFF{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_stash_count": true,
|
||||
"fetch_status": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"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": {
|
||||
"fetch_stash_count": 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",
|
||||
"properties": {
|
||||
"prefix": "<#26C6DA>\uE0B1 </>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"foreground": "#FFE700",
|
||||
"properties": {
|
||||
"prefix": "",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"powerline_symbol": "\uE0B4",
|
||||
"properties": {
|
||||
"prefix": " ",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -31,17 +31,17 @@
|
|||
"foreground": "#000000",
|
||||
"background": "#4e9a06",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#c4a000{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#4e9a06{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#c4a000{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#4e9a06{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"branch_icon": "\uF126 ",
|
||||
"fetch_stash_count": true,
|
||||
"fetch_status": 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",
|
||||
"background": "#95ffa4",
|
||||
"properties": {
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
"branch_ahead_icon": "<#88C0D0>\u21e1 </>",
|
||||
"branch_behind_icon": "<#88C0D0>\u21e3 </>",
|
||||
"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": "",
|
||||
"prefix": " git(",
|
||||
"postfix": ") ",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"branch_icon": "",
|
||||
"prefix": "<#5FAAE8>git:(</>",
|
||||
"postfix": "<#5FAAE8>)</>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
"fetch_upstream_icon": true,
|
||||
"prefix": "[ ",
|
||||
"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",
|
||||
"foreground": "#424242",
|
||||
"foreground_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#053F22{{ end }}",
|
||||
"{{ if or (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#0A703E{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#053F22{{ end }}",
|
||||
"{{ if or (gt .Ahead 0) (gt .Behind 0) }}#0A703E{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_status": true,
|
||||
|
@ -49,7 +49,7 @@
|
|||
"fetch_upstream_icon": true,
|
||||
"prefix": " [",
|
||||
"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",
|
||||
"background": "#2f2f2f",
|
||||
"foreground_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffeb3b{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#2EC4B6{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#8A4FFF{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb3b{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#2EC4B6{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#8A4FFF{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_stash_count": true,
|
||||
"fetch_status": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"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",
|
||||
"background": "#2f2f2f",
|
||||
"foreground_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ffeb3b{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#2EC4B6{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#8A4FFF{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb3b{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#2EC4B6{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#8A4FFF{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_stash_count": true,
|
||||
"fetch_status": true,
|
||||
"fetch_upstream_icon": true,
|
||||
"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",
|
||||
"properties": {
|
||||
"prefix": "<#ffffff>git:</>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"branch_icon": "",
|
||||
"fetch_stash_count": true,
|
||||
"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></>",
|
||||
"fetch_stash_count": true,
|
||||
"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": {
|
||||
"prefix": "<#ffffff>on</> ",
|
||||
"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",
|
||||
"background": "#95ffa4",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ff9248{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#c5b6ad{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#c5b6ad{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_status": true,
|
||||
|
@ -90,7 +90,7 @@
|
|||
"no_commits_icon": "[no commits]",
|
||||
"rebase_icon": "\u2c62 ",
|
||||
"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": {
|
||||
"fetch_stash_count": 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",
|
||||
"type": "git"
|
||||
|
|
|
@ -41,16 +41,16 @@
|
|||
"foreground": "#193549",
|
||||
"background": "#d2ff5e",
|
||||
"background_templates": [
|
||||
"{{ if or (.Repo.Working.Changed) (.Repo.Staging.Changed) }}#ff9248{{ end }}",
|
||||
"{{ if and (gt .Repo.Ahead 0) (gt .Repo.Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Repo.Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Repo.Behind 0 }}#f17c37{{ end }}"
|
||||
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ff9248{{ end }}",
|
||||
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}",
|
||||
"{{ if gt .Ahead 0 }}#89d1dc{{ end }}",
|
||||
"{{ if gt .Behind 0 }}#f17c37{{ end }}"
|
||||
],
|
||||
"properties": {
|
||||
"fetch_status": true,
|
||||
"fetch_stash_count": 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": {
|
||||
"prefix": ":: <lightBlue>git(</>",
|
||||
"postfix": "<lightBlue>)</>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"prefix": "HEAD:",
|
||||
"branch_icon": "",
|
||||
"fetch_upstream_icon": false,
|
||||
"template": "{{ .Repo.UpstreamIcon }}{{ .Repo.HEAD }}"
|
||||
"template": "{{ .UpstreamIcon }}{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
"style": "plain",
|
||||
"properties": {
|
||||
"prefix": "<darkGray>on</> <white>git:</>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"branch_icon": "",
|
||||
"prefix": " <#DDB15F>git(</>",
|
||||
"postfix": "<#DDB15F>)</>",
|
||||
"template": "{{ .Repo.HEAD }}"
|
||||
"template": "{{ .HEAD }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue