fixed issue with utf characters not rendering
This commit is contained in:
		
							parent
							
								
									6ca8a14094
								
							
						
					
					
						commit
						bc94309b57
					
				| @ -15,7 +15,7 @@ type Weather struct { | ||||
| } | ||||
| 
 | ||||
| func (w *Weather) String() string { | ||||
| 	return fmt.Sprintf("%c  %.1f%cf %d%%", w.Icon, w.Temp, '\u00B0', w.Humidity) // Output as ICON ##.#*F ##% where the rune is a degree sign | ||||
| 	return fmt.Sprintf("%c %.1f%c %d%%", w.Icon, w.Temp, '\ue341', w.Humidity) // Output as ICON ##.#*F ##% where the rune is a degree sign | ||||
| } | ||||
| 
 | ||||
| func main() { | ||||
| @ -59,25 +59,25 @@ func getIcon(code string) rune { | ||||
| 	switch weather { | ||||
| 	case "01": | ||||
| 		// clear skys | ||||
| 		return '\u263C' // sun code | ||||
| 		return '\ue30d' // sun code | ||||
| 	case "02", "03": | ||||
| 		// few clouds and scattered | ||||
| 		return '\U0001F324' // small clouds with sun | ||||
| 		return '\ue302' // small clouds with sun | ||||
| 	case "04": | ||||
| 		// broken clouds | ||||
| 		return '\U0001F325' // big clouds with sun | ||||
| 		return '\ue312' // big clouds with sun | ||||
| 	case "09", "10": | ||||
| 		// rain | ||||
| 		return '\U0001F327' // cloud with rain | ||||
| 		return '\ue318' // cloud with rain | ||||
| 	case "11": | ||||
| 		// thunderstorm | ||||
| 		return '\U0001F329' // thunderstorm cloud | ||||
| 		return '\ue31d' // thunderstorm cloud | ||||
| 	case "13": | ||||
| 		// snow | ||||
| 		return '\U0001F328' // snow cloud | ||||
| 		return '\ue31a' // snow cloud | ||||
| 	case "50": | ||||
| 		// mist | ||||
| 		return '\U0001F32B' // fog | ||||
| 		return '\ue313' // fog | ||||
| 	default: | ||||
| 		return '\uFFFD' // question mark | ||||
| 	} | ||||
|  | ||||
										
											Binary file not shown.
										
									
								
							| @ -17,11 +17,15 @@ set -g @plugin 'tmux-plugins/tmux-sensible' | ||||
| # status bar | ||||
| set -g @plugin 'thewtex/tmux-mem-cpu-load' | ||||
| 
 | ||||
| # clock settings | ||||
| set -g clock-mode-colour white | ||||
| 
 | ||||
| # status config | ||||
| set -g status-interval 5 | ||||
| set -g status-right "#[bg=black]#(~/.tmux/plugins/tmux-mem-cpu-load/tmux-mem-cpu-load -p -i 1 -a 1)#[default] %a %l:%M " | ||||
| set -g status-style "bg=black, fg=white" | ||||
| set -g status-right "| #(~/.tmux/plugins/tmux-mem-cpu-load/tmux-mem-cpu-load -p -i 1 -a 1)|#[default] %a %l:%M " | ||||
| set -g status-right-length 100 | ||||
| set -g status-left "#[bg=black,fg=white]#(~/.dotfiles/bin/weather/weather) | #[default] " | ||||
| set -g status-left "#(~/.dotfiles/bin/weather/weather) | " | ||||
| set -g status-left-length 20 | ||||
| 
 | ||||
| # tmux auto start | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Keegan
						Keegan