-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathicon.lua
59 lines (45 loc) · 1.13 KB
/
icon.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
-- weather emojis
local names = {
-- day
day_clear_sky = "☀️",
day_few_clouds = "☀️☁️",
-- night
night_clear_sky = "🌙",
night_few_clouds = "🌙☁️",
-- generic
scattered_clouds = "☁️",
broken_clouds = "☁️☁️",
shower_rain = "🌧️",
rain = "☔",
thunderstorm = "⚡",
snow = "❄️",
mist = "🌫️",
}
-- weather icon codes
-- https://openweathermap.org/weather-conditions
local codes = {
-- day
['01d'] = names.day_clear_sky,
['02d'] = names.day_few_clouds,
['03d'] = names.scattered_clouds,
['04d'] = names.broken_clouds,
['09d'] = names.shower_rain,
['10d'] = names.rain,
['11d'] = names.thunderstorm,
['13d'] = names.snow,
['50d'] = names.mist,
-- night
['01n'] = names.night_clear_sky,
['02n'] = names.night_few_clouds,
['03n'] = names.scattered_clouds,
['04n'] = names.broken_clouds,
['09n'] = names.shower_rain,
['10n'] = names.rain,
['11n'] = names.thunderstorm,
['13n'] = names.snow,
['50n'] = names.mist,
}
return {
by_name = names,
by_code = codes
}