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

Improve the display of Twitter; less-harsh colours

This commit is contained in:
Chris Cummer 2019-05-11 08:49:26 -07:00
parent 197b3a50ef
commit db746802c9

View File

@ -77,7 +77,7 @@ func (widget *Widget) display() {
title := fmt.Sprintf("Twitter - [green]@%s[white]", widget.CurrentSource()) title := fmt.Sprintf("Twitter - [green]@%s[white]", widget.CurrentSource())
if len(tweets) == 0 { if len(tweets) == 0 {
str := fmt.Sprintf("\n\n\n%s", wtf.CenterText("[blue]No Tweets[white]", 50)) str := fmt.Sprintf("\n\n\n%s", wtf.CenterText("[lightblue]No Tweets[white]", 50))
widget.View.SetText(str) widget.View.SetText(str)
return return
} }
@ -112,7 +112,7 @@ func (widget *Widget) formatText(text string) string {
// @name mentions // @name mentions
atRegExp := regexp.MustCompile(`@[0-9A-Za-z_]*`) atRegExp := regexp.MustCompile(`@[0-9A-Za-z_]*`)
result = atRegExp.ReplaceAllString(result, "[blue]${0}[white]") result = atRegExp.ReplaceAllString(result, "[lightblue]${0}[white]")
// HTTP(S) links // HTTP(S) links
linkRegExp := regexp.MustCompile(`http[s:\/.0-9A-Za-z]*`) linkRegExp := regexp.MustCompile(`http[s:\/.0-9A-Za-z]*`)