BlingCorp/bling

Bling looks for icons only in user config directory, even when installed to `/usr/share/awesome/lib/bling`

nawordar opened this issue · 1 comments

I would like to create an AUR package for this plugin. Plugins for awesome in AUR are installed in /usr/share/awesome/lib directory, where they are available to all users. When I packaged and installed this plugin this way, I've got multiple errors in log:

2021-11-05 13:15:55 E: awesome: Failed to load '/home/nawordar/.config/awesome/bling/icons/layouts/deck.png': Failed to open file “/home/nawordar/.config/awesome/bling/icons/layouts/deck.png”: No such file or directory
stack traceback:
        /usr/share/awesome/lib/gears/surface.lua:99: in function </usr/share/awesome/lib/gears/surface.lua:91>
        (...tail calls...)
        /usr/share/awesome/lib/gears/surface.lua:146: in function 'gears.surface.duplicate_surface'
        /usr/share/awesome/lib/gears/color.lua:340: in function 'gears.color.recolor_image'
        (...tail calls...)
        /usr/share/awesome/lib/bling/layout/init.lua:19: in main chunk
        [C]: in function 'require'
        /usr/share/awesome/lib/bling/init.lua:6: in main chunk
        [C]: in function 'require'
        /home/nawordar/.config/awesome/rc.lua.test:19: in main chunk

Valid issue. It's also needed for the luarocks package where icons currently don't work.
Just to nitpick on the title though: Bling doesn't just look in ~/.config/awesome/bling. It looks in the users config directory and in that it looks down the right path that bling lies in (so you can actually set your XDG_CONFIG_DIR and have a modules/ submodule in your config and dump bling in there without issues).