lcpz / lain

Awesome WM complements
GNU General Public License v2.0
1.05k stars 212 forks source link

Floor division requires Lua > 5.2 #519

Closed lexxxel closed 1 year ago

lexxxel commented 2 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 2 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 2 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.