awesome-wm-widgets
awesome-wm-widgets copied to clipboard
github activity widget error
I installed it as supposed to afaik, and i get this error:
github-activity-widget.lua:279: attempt to call nil value (method 'buttons')
Am i missing something?
hmmm, do you use the latest version? There is nothing about buttons on line 279
On latest master the error is the same but from line 259.
it seems that github_widget doesn't exist at this point (it's nil) which is strange, it was created on line 108, and it works on my machine ;)
Can you share your rc.lua? I checked your gitlab, but didin't find any widgets there
I've put all my widgets in the theme.lua file. Haven't gotten around to cleaning everything up yet. https://gitlab.com/fuzebox/dotfiles/-/tree/master/awesome/themes/powerarrow-gruvbox
Could you please try to move initialization of the widget inside the theme.at_screen_connect(s)
, just in case. Otherwise could you let me know how to initialize the modules, after I cloned the repo.
I met the same promblem. I'm sure I follow the instructions in README and use the latest awesome wm.
I'm confused about it. Any advice, please?
I spent some time and find a way to solve it. Since I'm not good at lua
, I can just get a solution that may work without a clearly explanation.
I noticed that not only github-acitvity
has this problem, so do the logout-menu
, gitlab
. It seems that the problem is :button
, which means the actions of button may not work. But the ram
widget works well with its button. So I look into its code and find it have an different method to initialize the widget.
The ram
works like this:
local ram_widget {} -- do not initialize now
function workder(user_args)
ram_widget = {
...
}
ram_widget:buttons(
...
)
end
But the github-etc
, gitlab
, logout-menu
work like this.
gitlab_widget = {
... -- initialize immediately
}
function worker(user_args)
gitlab_widget:buttons(
...
)
end
I believe it's the wrong way to initialize the widget that cause such an error.
So I try to change the locatin of the initialization of github-activity
just like ram
widget do and it works well now.
Hope this helpful to those who need.