mirror of
				https://github.com/taigrr/wtf
				synced 2025-01-18 04:03:14 -08:00 
			
		
		
		
	Close #205. cmdrunner will now respect title attribute
This commit is contained in:
		
							parent
							
								
									d751821c34
								
							
						
					
					
						commit
						154cb3ea4f
					
				| @ -36,14 +36,16 @@ func NewWidget() *Widget { | ||||
| func (widget *Widget) Refresh() { | ||||
| 	widget.UpdateRefreshedAt() | ||||
| 	widget.execute() | ||||
| 	widget.View.SetTitle(fmt.Sprintf(" %s ", widget)) | ||||
| 
 | ||||
| 	title := Config.UString("wtf.mods.cmdrunner.title", widget.String()) | ||||
| 	widget.View.SetTitle(fmt.Sprintf("%s", title)) | ||||
| 
 | ||||
| 	widget.View.SetText(fmt.Sprintf("%s", widget.result)) | ||||
| } | ||||
| 
 | ||||
| func (widget *Widget) String() string { | ||||
| 	args := strings.Join(widget.args, " ") | ||||
| 	return fmt.Sprintf("%s %s", widget.cmd, args) | ||||
| 	return fmt.Sprintf(" %s %s ", widget.cmd, args) | ||||
| } | ||||
| 
 | ||||
| func (widget *Widget) execute() { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user