lain icon indicating copy to clipboard operation
lain copied to clipboard

Cal widget fails on awesome-luajit due to UTF8 requeriment

Open edubart opened this issue 5 years ago • 2 comments

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)

edubart avatar Apr 13 '21 11:04 edubart

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

pmsdrh avatar May 21 '21 15:05 pmsdrh

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.

razamatan avatar Sep 14 '21 20:09 razamatan