lcpz / lain

Awesome WM complements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

widgets.cal week numbers are going wild

seqizz opened this issue · comments

Hi there,

First of all, thanks for all of this, I'm using most of it.

Calendar widget seems to have some confusion when I enable week numbers:

image

Also non-full weeks counts as two different week, does not look right:

image

image

Feel free to close if you think this is an issue about the environment 🤞 I've tried to understand the code, but the calculation blew my mind..

awesome version:

awesome 4.3 (Too long)
 • Compiled against Lua 5.2.4 (running with Lua 5.2)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.6
 • LGI version: [string "return require('lgi.version')"]:1: module 'lgi.version' not found:
        no field package.preload['lgi.version']
        no file '/usr/share/lua/5.2/lgi/version.lua'
        no file '/usr/share/lua/5.2/lgi/version/init.lua'
        no file '/usr/lib/lua/5.2/lgi/version.lua'
        no file '/usr/lib/lua/5.2/lgi/version/init.lua'
        no file './lgi/version.lua'
        no file '/usr/lib/lua/5.2/lgi/version.so'
        no file '/usr/lib/lua/5.2/loadall.so'
        no file './lgi/version.so'
        no file '/usr/lib/lua/5.2/lgi.so'
        no file '/usr/lib/lua/5.2/loadall.so'
        no file './lgi.so'

lua version: 5.2.4

Hi, thank you for your notifying me, I can replicate the issue.

This is the culprit part of the code. In particular, the week number is defined in notifytable[2]. Feel free to give it a look. I will try myself ASAP.