lcpz / lain

Awesome WM complements
GNU General Public License v2.0
1.06k stars 210 forks source link

Floor division requires Lua > 5.2 #519

Closed lexxxel closed 2 years ago

lexxxel commented 3 years ago

Using gentoo, my system defaulted to Lua 5.1 which broke at least the weather widget (floor division ['//'] is used there). I did not find any documentation about the minimum requirements in this repo. Maybe that would be useful to add.

trap000d commented 3 years ago

To make it working in Lua 5.1 replace the line with floor division operator (weather.lua:L97)

for i = 1, weather_now["cnt"], weather_now["cnt"]//cnt do

to

for i = 1, weather_now["cnt"], math.floor(weather_now["cnt"]/cnt) do
lexxxel commented 3 years ago

I fixed it already with an update of my used lua version to 5.3. So I'm fine. The issue is more about others then my.