Elv13 / radical

An extensible menu subsystem for Awesome WM
222 stars 16 forks source link

Error trying to use example from README #29

Closed ctlajoie closed 9 years ago

ctlajoie commented 9 years ago

I'm having a problem getting the menu to work as described. I must admit I'm new to awesome and Lua, but I do code proficiently in other languages.

For reference, this is my rc.lua Just trying to test out radical, I stuck the demo code in starting on line 262 and added the text box to the top left corner of the screen. The first time I tried this, I had the code to generate the sub-menu uncommented. Awesome will not load the file like this and this is the error I get. radicalerror

I then tried commenting out the item with the sub-menu (exactly like the gist shows). In this case the rc.lua loads ok, but I get this error when right clicking on my text box. radicalerror2

This could easily be my fault, but if that's the case I can't figure out what I could be doing wrong. Help?

Elv13 commented 9 years ago

Somehow the theme submenu image isn't set. I patched this to check if there is one before using it.

ctlajoie commented 9 years ago

Yeah there's clearly something wrong with my setup. That fixed the error on that line, but now I'm getting an error on the set_menu call.

error: /usr/share/awesome/lib/gears/debug.lua:23: Assertion failed: 'false'
stack traceback:
    /usr/share/awesome/lib/gears/debug.lua:23: in function 'assert'
    /usr/share/awesome/lib/wibox/widget/base.lua:125: in function 'check_widget'
    /usr/share/awesome/lib/wibox/layout/fixed.lua:55: in function 'add'
    ...chris/.config/awesome/radical/item/layout/horizontal.lua:241: in function <...chris/.config/awesome/radical/item/layout/horizontal.lua:172>
    (...tail calls...)
    /home/chris/.config/awesome/radical/layout/vertical.lua:116: in function 'f'
    /home/chris/.config/awesome/radical/context.lua:263: in function 'setup_item'
    /home/chris/.config/awesome/radical/base.lua:194: in function 'add_item'
    /home/chris/.config/awesome/rc.lua:266: in main chunk

This is my theme.lua file: https://gist.github.com/ctlajoie/5fccfdeefc2019dbe770#file-theme-lua As you can see I copied/modified it from copycat-killer's holo theme. I added a menu_submenu_icon to see if that was the whole problem. Apparently it is not.

Any ideas what's causing me all these problems?

Elv13 commented 9 years ago

It is another issue related to the submenu arrow widget. Can you give me a copy of the theme so I can reproduce it? I could fix this one based on the backtrace, but I guess there would be a thrid down the road.

ctlajoie commented 9 years ago

I linked my theme file in the previous comment (below the stack trace). I actually did set the menu_submenu_icon to see if that would fix my problem, but it did not fix it.

ctlajoie commented 9 years ago

I figured out what the problem was. I had to copy the default theme into my local themes directory. i.e. cp -r /usr/share/awesome/themes/default ~/.config/awesome/theme/ Is this intentionally required?

Elv13 commented 9 years ago

No, but your rc.lua say the theme is in os.getenv("HOME") .. "/.config/awesome/themes/holo/theme.lua" that theme need the expected variables to be set. If they are not there, strange things will happen. It is still a Radical bug, but I am glad you "solved" it.

ctlajoie commented 9 years ago

I see, thanks for the help. I appreciate it.