mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Widget text spacing
This commit is contained in:
parent
1404140b82
commit
42734a502c
@ -66,7 +66,7 @@ func (widget *Widget) contentFrom(items []Item) string {
|
||||
return fmt.Sprintf("\n\n\n\n\n\n\n\n%s", wtf.CenterText("[grey]no one[white]", 50))
|
||||
}
|
||||
|
||||
str := "\n"
|
||||
str := ""
|
||||
for _, item := range items {
|
||||
str = str + widget.format(item)
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ func (widget *Widget) contentFrom(events *calendar.Events) string {
|
||||
str := ""
|
||||
for _, event := range events.Items {
|
||||
str = str + fmt.Sprintf(
|
||||
"%s\n [%s]%s[white]\n [%s]%s %s[white]\n",
|
||||
"%s [%s]%s[white]\n [%s]%s %s[white]\n\n",
|
||||
widget.dayDivider(event, prevEvent),
|
||||
widget.titleColor(event),
|
||||
widget.eventSummary(event),
|
||||
@ -91,7 +91,7 @@ func (widget *Widget) dayDivider(event, prevEvent *calendar.Event) string {
|
||||
currStartTime, _ := time.Parse(time.RFC3339, event.Start.DateTime)
|
||||
|
||||
if currStartTime.Day() != prevStartTime.Day() {
|
||||
return "[green]⎯[white]"
|
||||
return "\n"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,7 @@ func (widget *Widget) addView() {
|
||||
}
|
||||
|
||||
func (widget *Widget) contentFrom(data map[string][]string) string {
|
||||
str := "\n"
|
||||
str = str + " [red]Branch[white]\n"
|
||||
str := " [red]Branch[white]\n"
|
||||
str = str + fmt.Sprintf(" %s", data["branch"][0])
|
||||
str = str + "\n"
|
||||
str = str + widget.formatChanges(data["changes"])
|
||||
|
@ -47,8 +47,7 @@ func (widget *Widget) Refresh() {
|
||||
widget.View.SetTitle(fmt.Sprintf(" Github: %s ", title))
|
||||
widget.RefreshedAt = time.Now()
|
||||
|
||||
str := "\n"
|
||||
str = str + " [red]Open Review Requests[white]\n"
|
||||
str := " [red]Open Review Requests[white]\n"
|
||||
str = str + widget.prsForReview(prs)
|
||||
str = str + "\n"
|
||||
str = str + " [red]Open Pull Requests[white]\n"
|
||||
|
@ -61,8 +61,7 @@ func (widget *Widget) addView() {
|
||||
}
|
||||
|
||||
func (widget *Widget) contentFrom(deploys []nr.ApplicationDeployment) string {
|
||||
str := "\n"
|
||||
str = str + " [red]Latest Deploys[white]\n"
|
||||
str := " [red]Latest Deploys[white]\n"
|
||||
|
||||
revisions := []string{}
|
||||
|
||||
|
@ -59,7 +59,7 @@ func (widget *Widget) addView() {
|
||||
}
|
||||
|
||||
func (widget *Widget) contentFrom(onCallResponse *OnCallResponse) string {
|
||||
str := "\n"
|
||||
str := ""
|
||||
|
||||
for _, data := range onCallResponse.OnCallData {
|
||||
str = str + fmt.Sprintf(" [green]%s[white]\n", widget.cleanScheduleName(data.Parent.Name))
|
||||
|
@ -60,7 +60,7 @@ func (widget *Widget) addView() {
|
||||
}
|
||||
|
||||
func (widget *Widget) contentFrom(data *owm.CurrentWeatherData) string {
|
||||
str := fmt.Sprintf("\n")
|
||||
str := "\n"
|
||||
|
||||
descs := []string{}
|
||||
for _, weather := range data.Weather {
|
||||
|
Loading…
x
Reference in New Issue
Block a user