alfunx / .dotfiles

There's no place like ~ !
MIT License
403 stars 18 forks source link

Awesome theme not loaded #4

Closed rockyhotas closed 5 years ago

rockyhotas commented 5 years ago

Presenting this theme, you mentioned this dotfiles repository. I cloned it to apply the theme, using AwesomeWM 4.2 on NetBSD 8.0. However, it doesn't work, showing two error messages:

Oops, an error happened!
invalid key to 'next'
Oops, there were errors during startup!
error while running function!
stack traceback:
[C]: in function 'key'
/usr/pkg/share/awesome/lib/awful/key.lua:88: in function </usr/pkg/share/awesome/lib/awful/key.lua:80>
(...tail calls...)
/home/userdir/.config/awesome/config/keys.lua:421:in function 'init'
/home/userdir/.config/awesome/rc.lua:103: in main chunk

I do not know the lua language. Is there anything I can do?

alfunx commented 5 years ago

Can you try to comment (or delete) the marked lines: .config/awesome/config/keys.lua:416-439

Thanks for reporting, this doesn't happen with the current Git version of AwesomeWM though.

rockyhotas commented 5 years ago

Can you try to comment (or delete) the marked lines: .config/awesome/config/keys.lua:416-439

Ok! Unfortunately, the result is another error (though maybe it is caused by a different problem):

Oops, an error happened!
/home/userdir/.config/awesome/config/screen.lua:51: attempt to call field 'at_screen_connect' (a nil valu...
Oops, there were errors during startup!
error while running function!
stack traceback:
    /home/userdir/.config/awesome/config/screen.lua:51: in function 'func'
    /usr/pkg/share/awesome/lib/awful/screen.lua:438: in function 'connect_for_each_screen'
    /home/userdir/.config/awesome/config/screen.lua:49: in function 'init'
    /home/userdir/.config/awesome/rc.lua:108: in main chunk
error: /home/userdir/.config/awesome/config/screen.lua:51: attempt to call field 'at_screen_connect' (a n...

Thanks for reporting, this doesn't happen with the current Git version of AwesomeWM though.

You're welcome. Surely, the version of AwesomeWM in pkgsrc (4.2nb3, the one I'm using) is older.

rockyhotas commented 5 years ago

If it can be useful, I followed this procedure to debug X. Here is the resulting log:

xauth:  file /home/userdir/.serverauth.6104 does not exist

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: NetBSD/amd64 8.0 - The NetBSD Foundation, Inc.
Current Operating System: NetBSD hostname 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Build Date: 14 August 2016  01:29:29AM

Current version of pixman: 0.34.0
    Before reporting problems, check http://wiki.X.Org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Nov 15 17:44:21 2018
(==) Using default built-in configuration (30 lines)
mtrr set failed: Operation not supported by device
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error:            Couldn't lookup keysym
>                   Symbol interpretation ignored
> Error:            Couldn't lookup keysym
>                   Symbol interpretation ignored
Errors from xkbcomp are not fatal to the X server
2018-11-15 17:44:22 E: Error during a protected call: /home/userdir/.config/awesome/lain/widget/mem.lua:37: attempt to perform arithmetic on field 'srec' (a nil value)
stack traceback:
    /home/userdir/.config/awesome/lain/widget/mem.lua:37: in function 'func'
    /usr/pkg/share/awesome/lib/gears/object.lua:118: in function 'emit_signal'
    /home/userdir/.config/awesome/lain/helpers.lua:96: in function 'newtimer'
    /home/userdir/.config/awesome/lain/widget/mem.lua:45: in function 'mem'
    /home/userdir/.config/awesome/themes/blackout/theme.lua:391: in main chunk
    [C]: in function 'dofile'
    [C]: in function 'xpcall'
    /usr/pkg/share/awesome/lib/gears/protected_call.lua:36: in function </usr/pkg/share/awesome/lib/gears/protected_call.lua:35>
    (...tail calls...)
    /usr/pkg/share/awesome/lib/beautiful/init.lua:196: in function 'init'
    /home/userdir/.config/awesome/rc.lua:96: in main chunk
2018-11-15 17:44:22 E: beautiful: error loading theme file /home/userdir/.config/awesome/themes/blackout/theme.lua
error while running function!
stack traceback:
    /home/userdir/.config/awesome/config/screen.lua:51: in function 'func'
    /usr/pkg/share/awesome/lib/awful/screen.lua:438: in function 'connect_for_each_screen'
    /home/userdir/.config/awesome/config/screen.lua:49: in function 'init'
    /home/userdir/.config/awesome/rc.lua:108: in main chunk
error: /home/userdir/.config/awesome/config/screen.lua:51: attempt to call field 'at_screen_connect' (a nil value)
2018-11-15 17:44:27 E: Error during a protected call: /home/userdir/.config/awesome/lain/widget/mem.lua:37: attempt to perform arithmetic on field 'srec' (a nil value)
stack traceback:
    /home/userdir/.config/awesome/lain/widget/mem.lua:37: in function 'func'
    /usr/pkg/share/awesome/lib/gears/object.lua:118: in function </usr/pkg/share/awesome/lib/gears/object.lua:115>
    [C]: in function 'xpcall'
    /usr/pkg/share/awesome/lib/gears/protected_call.lua:36: in function </usr/pkg/share/awesome/lib/gears/protected_call.lua:35>
    (...tail calls...)
    /usr/pkg/share/awesome/lib/gears/timer.lua:91: in function </usr/pkg/share/awesome/lib/gears/timer.lua:90>

(process:6410): GLib-WARNING **: 17:44:27.431: poll(2) failed due to: Resource temporarily unavailable.
xinit: connection to X server lost

waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.
alfunx commented 5 years ago

Surely, the version of AwesomeWM in pkgsrc (4.2nb3, the one I'm using) is older.

It is very recent; what I meant to state is that it's something that has been fixed.

This second error is unrelated to the first one. Your second logs provides some useful information:

stack traceback:
    /home/userdir/.config/awesome/lain/widget/mem.lua:37: in function 'func'
    /usr/pkg/share/awesome/lib/gears/object.lua:118: in function 'emit_signal'
    /home/userdir/.config/awesome/lain/helpers.lua:96: in function 'newtimer'
    /home/userdir/.config/awesome/lain/widget/mem.lua:45: in function 'mem'
    /home/userdir/.config/awesome/themes/blackout/theme.lua:391: in main chunk

In this case mem (the memory widget) is causing the error. Can you try to comment out .config/awesome/themes/blackout/theme.lua:1145 (mem_widget is a wrapper widget around mem)? And also try to comment out subsequent widgets, if there are more errors. As far as I can tell so far, the origin seems to be Lain, though I'm not sure. For the other widgets, also make sure to setup the variables according to your machine: .config/awesome/rc.lua:51-64.

ghost commented 5 years ago

Sorry if I'm hijacking you guys, but... ...things like lain or vicious won't work OOTB in NetBSD, they are built for Linux. There was a port of vicious to FreeBSD, but I don't know if it's still alive. In any case, it also would need to be modified. What I can tell is that the widgets built natively into awesome work, I use awesome on both Void and NetBSD. On Void I use vicious, on NetBSD I use only the native support. Example - battery widget, there is no /sys/class/power_supply on NetBSD so, for example this, https://github.com/deficient/battery-widget/blob/master/README.md won't work. Regards

rockyhotas commented 5 years ago

Can you try to comment out .config/awesome/themes/blackout/theme.lua:1145 (mem_widget is a wrapper widget around mem)? And also try to comment out subsequent widgets, if there are more errors.

I commented as suggested, but the error keeps being the same.

As far as I can tell so far, the origin seems to be Lain, though I'm not sure. For the other widgets, also make sure to setup the variables according to your machine: .config/awesome/rc.lua:51-64.

Ok, I've modified the variables, but no changes in the above error. Maybe the problem is just the one signaled by @voidpin .

rockyhotas commented 5 years ago

Sorry if I'm hijacking you guys, but...

No problem, thank you instead.

...things like lain or vicious won't work OOTB in NetBSD, they are built for Linux.

Now I can't try with a Linux machine, but this is important to know. Thanks.

What I can tell is that the widgets built natively into awesome work, I use awesome on both Void and NetBSD. On Void I use vicious, on NetBSD I use only the native support.

Ok! If you know any theme using only native support, and if they are not OT here, please let me know.

Example - battery widget, there is no /sys/class/power_supply on NetBSD so, for example this, https://github.com/deficient/battery-widget/blob/master/README.md won't work.

Yes, of course: that path doesn't exist in NetBSD.

ghost commented 5 years ago

@rockyhotas We could either continue the discussion here or move over to https://unitedbsd.com Does this look good enough for you, https://unitedbsd.com/t/what-does-your-bsd-look-like-screen-shots/109/21?u=pin ?

EDIT: The four native themes found in /usr/pkg/share/awesome/themes will work OOTB. I've created mine from zenburn.

rockyhotas commented 5 years ago

Yes, I prefer to continue the discussion about your Awesome theme in https://unitedbsd.com/t/what-does-your-bsd-look-like-screen-shots/109/24. As regards the theme of this issue, instead, maybe the reason why it does not work is due to lain and freedesktop, that are not compatible with NetBSD. Thank you :)

Note for @alfunx : there has been an upgrade available in NetBSD involving the packages

gobject-introspection-1.56.1 lua52-gi-0.9.1 libxkbcommon-0.8.2 awesome-4.2nb3

After applying it, however, the same error keeps appearing. Thank you so much anyway!