lcpz / awesome-copycats

Awesome WM themes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

beautiful:at_screen_connect used by theme but not part of beautiful

atsepkov opened this issue · comments

This question has been asked on several other websites (including StackOverflow) but no working solution has been posted, the closest seems to be to comment out problematic logic, go back to version that doesn't use it, or remove the problematic theme (in this case awesome-copycats).

Here is the actual problem:
On line 222 of rc.lua there is a following line:

awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) end)

This line causes an error since at_screen_connect is not part of beautiful library that comes with Awesome 4.2 (I checked, and you can check it yourself in https://github.com/lcpz/awesome/tree/master/lib/beautiful).

Ok, as I'm playing with config more, the culprits seem to be these themes, the error occurs when using any of them (the rest of the themes are fine):

  • blackburn [1]
  • copland [2]
  • dremora [3]
  • multicolor [5]
  • rainbow [8]

I do see at_screen_connect function defined within theme and that beautiful.get() returns the theme itself, which leads me to believe that the above 5 themes are broken.

This line causes an error since at_screen_connect is not part of beautiful library

That function is defined inside theme.lua, for instance here in multicolor theme.

As you can see here in rc.lua, the beautiful variable becomes a pointer to the table theme in theme.lua.

The reason why you're getting an error at that line in rc.lua is because beautiful can't load the theme table. In order to find out why, please do as requested here.

It is possible that you don't have Glib >= 2.54, which is required by the filesystem widget that is present in each of the themes listed above.

PS: Please tell fellow users that they are free to come ask for my help here.

I see, this is a fresh install of Ubuntu, glib claims it's already the newest version but seems to be below the required one:

libc6 is already the newest version (2.27-3ubuntu1)

Commenting out theme.fs declaration and invocation did indeed fix the issue, so it looks like you're right about Glib. Thanks!

Would it be better to temporarily disable this widget in all themes until the popular distros (i.e. Ubuntu) update the library version to make transition easier for newcomers to these themes?

Would it be better to temporarily disable this widget in all themes until the popular distros (i.e. Ubuntu) update the library version to make transition easier for newcomers to these themes?

According to GIO reference manual they are already 2 versions ahead, while most distros are stucked at 2.5 for unspecified reasons since years. Some users even urged their distro maintainers to update, but in vain.

My first idea was to just wait until everyone would synchronise with a compatible version, but yeah, maybe I'd better just comment the widget itself and put a reference.

Hi,
I have this issue too. This is the Xorg log.

2018-07-19 09:34:34 E: Error during a protected call: ~/.config/awesome/themes/multicolor/theme.lua:129: attempt to concatenate a nil value (field 'used')
stack traceback:
	~/.config/awesome/themes/multicolor/theme.lua:129: in upvalue 'settings'
	~/.config/awesome/lain/widget/fs.lua:107: in local 'func'
	/usr/share/awesome/lib/gears/object.lua:143: in function 'gears.object.emit_signal'
	~/.config/awesome/lain/helpers.lua:96: in function 'lain.helpers.newtimer'
	~/.config/awesome/lain/widget/fs.lua:137: in function 'lain.widget.fs'
	~/.config/awesome/themes/multicolor/theme.lua:126: in main chunk
	[C]: in function 'dofile'
	[C]: in function 'xpcall'
	/usr/share/awesome/lib/gears/protected_call.lua:36: in function </usr/share/awesome/lib/gears/protected_call.lua:35>
	(...tail calls...)
	/usr/share/awesome/lib/beautiful/init.lua:196: in function 'beautiful.init.init'
	~/.config/awesome/rc.lua:183: in main chunk
2018-07-19 09:34:34 E: beautiful: error loading theme file ~/.config/awesome/themes/multicolor/theme.lua
error while running function!
stack traceback:
	~/.config/awesome/rc.lua:222: in local 'func'
	/usr/share/awesome/lib/awful/screen.lua:438: in function 'awful.screen.connect_for_each_screen'
	~/.config/awesome/rc.lua:222: in main chunk
error: ~/.config/awesome/rc.lua:222: attempt to call a nil value (field 'at_screen_connect')

@MisterDA That is actually related to a string that I forgot to update when I've pushed the new lain.widget.fs implementation. Thanks for reporting.