Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github activity widget error #172

Open
petterssonjonas opened this issue Jul 15, 2020 · 7 comments
Open

github activity widget error #172

petterssonjonas opened this issue Jul 15, 2020 · 7 comments

Comments

@petterssonjonas
Copy link

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?

@streetturtle
Copy link
Owner

streetturtle commented Jul 23, 2020

hmmm, do you use the latest version? There is nothing about buttons on line 279

@petterssonjonas
Copy link
Author

On latest master the error is the same but from line 259.

@streetturtle
Copy link
Owner

streetturtle commented Jul 30, 2020

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

@petterssonjonas
Copy link
Author

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

@streetturtle
Copy link
Owner

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.

@kawhicurry
Copy link

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?

@kawhicurry
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants