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

Fix multiple small issues with widget titles

This commit is contained in:
Chris Cummer
2018-07-28 17:37:05 -07:00
parent 34977f7ffa
commit 3ce6daee71
4 changed files with 14 additions and 4 deletions

View File

@@ -42,7 +42,12 @@ func (widget *Widget) Refresh() {
func (widget *Widget) String() string {
args := strings.Join(widget.args, " ")
return fmt.Sprintf(" %s %s ", widget.cmd, args)
if args != "" {
return fmt.Sprintf(" %s %s ", widget.cmd, args)
} else {
return fmt.Sprintf(" %s ", widget.cmd)
}
}
func (widget *Widget) execute() {