Skip to content

Commit

Permalink
Patch "feels like" layout (schachmat#134)
Browse files Browse the repository at this point in the history
Change "feels like" temp display

Changing the "feels like" temperature to always be to the right of the true temperature, and to be in parenthesis for both frontends that use it.
  • Loading branch information
Silent-Hunter authored and schachmat committed Feb 11, 2019
1 parent 415efdf commit 994e4f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions frontends/ascii-art-table.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ func (c *aatConfig) formatTemp(cond iface.Cond) string {
t := *cond.TempC
if cond.FeelsLikeC != nil {
fl := *cond.FeelsLikeC
if fl < t {
return aatPad(fmt.Sprintf("%s – %s %s", color(fl), color(t), u), 15)
} else if fl > t {
return aatPad(fmt.Sprintf("%s – %s %s", color(t), color(fl), u), 15)
}
return aatPad(fmt.Sprintf("%s (%s) %s", color(t), color(fl), u), 15)
}
return aatPad(fmt.Sprintf("%s %s", color(t), u), 15)
}
Expand Down
6 changes: 1 addition & 5 deletions frontends/emoji.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ func (c *emojiConfig) formatTemp(cond iface.Cond) string {
t := *cond.TempC
if cond.FeelsLikeC != nil {
fl := *cond.FeelsLikeC
if fl < t {
return aatPad(fmt.Sprintf("%s – %s %s", color(fl), color(t), u), 12)
} else if fl > t {
return aatPad(fmt.Sprintf("%s – %s %s", color(t), color(fl), u), 12)
}
return aatPad(fmt.Sprintf("%s (%s) %s", color(t), color(fl), u), 12)
}
return aatPad(fmt.Sprintf("%s %s", color(t), u), 12)
}
Expand Down

0 comments on commit 994e4f1

Please sign in to comment.