lcpz / lain

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

Cal widget fails on awesome-luajit due to UTF8 requeriment #503

Closed edubart closed 2 years ago

edubart commented 3 years ago

I use awesome with luajit, and luajit does not have the UTF-8 module, a recent change in cal.lua is requiring utf8, but the global utf8 is nil on luajit, so the cal widget generate errors when I hover it.

Oops, an error happened!
../lain/widget/cal.lua:64: attempt to index upvalue 'utf8' (a nil value)
pmsdrh commented 3 years ago

Hi! you can remove this :sub(1, utf8.offset(1, 3)) (line 64)

razamatan commented 3 years ago

this is a problem for anyone not using lua 5.3+.

the fix is to undo https://github.com/lcpz/lain/commit/3a6882af54dd4bb5f0fec3567dab2b5b64dec4fe locally. ofc, you won't get to have utf8 chars in your calendar.