lcpz / lain

Awesome WM complements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Floor division requires Lua > 5.2

lexxxel opened this issue · comments

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.

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

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.