@@ -23,39 +23,37 @@ var (
2323white = color .New (color .FgWhite )
2424magenta = color .New (color .FgMagenta )
2525
26+ keySymbol = " " + yellow .Sprint ("🔑" ) + ws
27+ sep = " " + yellow .Sprint ("|" ) + ws
28+
29+ pushable = string (blue .Sprint ("↖" ))
30+ pullable = string (blue .Sprint ("↘" ))
31+ dirty = string (yellow .Sprint ("✗" ))
32+
2633bold = color .New (color .Bold )
34+ )
2735
36+ const (
2837maxBranchLength = 15
2938maxRepositoryLength = 20
3039hashLength = 7
3140
32- ws = " "
33- pushable = string (blue .Sprint ("↖" ))
34- pullable = string (blue .Sprint ("↘" ))
35- dirty = string (yellow .Sprint ("✗" ))
36-
41+ ws = " "
3742queuedSymbol = "•"
3843workingSymbol = "•"
3944successSymbol = "✔"
4045pauseSymbol = "॥"
4146failSymbol = "✗"
4247
43- fetchSymbol = "↓"
44- pullSymbol = "↓↳"
45- mergeSymbol = "↳"
46- checkoutSymbol = "↱"
47-
48- keySymbol = ws + yellow .Sprint ("🔑" ) + ws
49-
50- sep = ws + yellow .Sprint ("|" ) + ws
51-
48+ fetchSymbol = "↓"
49+ pullSymbol = "↓↳"
50+ mergeSymbol = "↳"
51+ checkoutSymbol = "↱"
5252modeSeperator = ""
5353keyBindingSeperator = "░"
5454
5555selectionIndicator = "→" + ws
5656tab = ws
57-
58- renderRules = & RepositoryDecorationRules {}
5957)
6058
6159// RepositoryDecorationRules is a rule set for creating repositry labels
@@ -70,7 +68,7 @@ type RepositoryDecorationRules struct {
7068// this function handles the render and representation of the repository
7169// TODO: cleanup is required, right now it looks too complicated
7270func (gui * Gui ) repositoryLabel (r * git.Repository ) string {
73- renderRules = gui .renderRules ()
71+ renderRules : = gui .renderRules ()
7472
7573gui .renderTableHeader (renderRules )
7674
@@ -151,8 +149,8 @@ func (gui *Gui) renderTableHeader(rule *RepositoryDecorationRules) {
151149var header string
152150revlen := 2 + rule .MaxPullables + 2 + rule .MaxPushables + 1
153151header = ws + magenta .Sprint (align ("revs" , revlen , true , true )) + sep
154- header = header + align (magenta .Sprint ("branch" ), renderRules .MaxBranch , true , true ) + sep
155- header = header + magenta .Sprint (align ("name" , renderRules .MaxName + 2 , true , true )) + sep
152+ header = header + align (magenta .Sprint ("branch" ), rule .MaxBranch , true , true ) + sep
153+ header = header + magenta .Sprint (align ("name" , rule .MaxName + 2 , true , true )) + sep
156154fmt .Fprintln (v , header )
157155}
158156
0 commit comments