1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Minor config tweaks

This commit is contained in:
Chris Cummer 2018-04-06 09:58:11 -07:00 committed by Chris Cummer
parent 85f010f886
commit fd5becd397
3 changed files with 5 additions and 4 deletions

View File

@ -9,7 +9,7 @@ wtf:
refreshInterval: 300
secretFile: "~/.wtf/gcal/client_secret.json"
git:
commitCount: 10
commitCount: 5
refreshInterval: 8
repository: "/Users/chris/go/src/github.com/senorprogrammer/wtf"
github:

View File

@ -54,6 +54,7 @@ func (widget *Widget) addView() {
view.SetBorderColor(tcell.ColorGray)
view.SetDynamicColors(true)
view.SetTitle(widget.Name)
view.SetWrap(false)
widget.View = view
}
@ -71,7 +72,7 @@ func (widget *Widget) contentFrom(data *owm.CurrentWeatherData) string {
tempUnit := Config.UString("wtf.weather.tempUnit", "C")
str = str + fmt.Sprintf("%8s: %4.1f° %s\n", "High", data.Main.TempMax, tempUnit)
str = str + fmt.Sprintf("%8s: [yellow]%4.1f° %s[white]\n", "Current", data.Main.Temp, tempUnit)
str = str + fmt.Sprintf("%8s: [green]%4.1f° %s[white]\n", "Current", data.Main.Temp, tempUnit)
str = str + fmt.Sprintf("%8s: %4.1f° %s\n", "Low", data.Main.TempMin, tempUnit)
str = str + "\n"

4
wtf.go
View File

@ -89,8 +89,8 @@ func main() {
grid.AddItem(bamboo.View, 0, 0, 2, 1, 0, 0, false)
grid.AddItem(cal.View, 2, 1, 4, 1, 0, 0, false)
grid.AddItem(git.View, 0, 2, 3, 3, 0, 0, false)
grid.AddItem(github.View, 3, 2, 2, 3, 0, 0, false)
grid.AddItem(git.View, 0, 2, 2, 3, 0, 0, false)
grid.AddItem(github.View, 2, 2, 2, 3, 0, 0, false)
grid.AddItem(weather.View, 0, 1, 1, 1, 0, 0, false)
grid.AddItem(sec.View, 5, 0, 1, 1, 0, 0, false)
grid.AddItem(opsgenie.View, 2, 0, 2, 1, 0, 0, false)