fixed issue with utf characters not rendering

nvim
Keegan 2 years ago
parent 6ca8a14094
commit bc94309b57

@ -15,7 +15,7 @@ type Weather struct {
} }
func (w *Weather) String() string { 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() { func main() {
@ -59,25 +59,25 @@ func getIcon(code string) rune {
switch weather { switch weather {
case "01": case "01":
// clear skys // clear skys
return '\u263C' // sun code return '\ue30d' // sun code
case "02", "03": case "02", "03":
// few clouds and scattered // few clouds and scattered
return '\U0001F324' // small clouds with sun return '\ue302' // small clouds with sun
case "04": case "04":
// broken clouds // broken clouds
return '\U0001F325' // big clouds with sun return '\ue312' // big clouds with sun
case "09", "10": case "09", "10":
// rain // rain
return '\U0001F327' // cloud with rain return '\ue318' // cloud with rain
case "11": case "11":
// thunderstorm // thunderstorm
return '\U0001F329' // thunderstorm cloud return '\ue31d' // thunderstorm cloud
case "13": case "13":
// snow // snow
return '\U0001F328' // snow cloud return '\ue31a' // snow cloud
case "50": case "50":
// mist // mist
return '\U0001F32B' // fog return '\ue313' // fog
default: default:
return '\uFFFD' // question mark return '\uFFFD' // question mark
} }

Binary file not shown.

@ -17,11 +17,15 @@ set -g @plugin 'tmux-plugins/tmux-sensible'
# status bar # status bar
set -g @plugin 'thewtex/tmux-mem-cpu-load' set -g @plugin 'thewtex/tmux-mem-cpu-load'
# clock settings
set -g clock-mode-colour white
# status config # status config
set -g status-interval 5 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-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 set -g status-left-length 20
# tmux auto start # tmux auto start

Loading…
Cancel
Save