So I realize I"m talking to myself, but the code here in awful.utils
appears to be incorrect

function util.geticonpath(iconname, exts, dirs, size)
    exts = exts or { 'png', 'gif' }
    dirs = dirs or { '/usr/share/pixmaps/' }
    for _, d in pairs(dirs) do
        for _, e in pairs(exts) do
            local icon
            if size then
                icon = string.format("%s%ux%u/%s.%s",
                       d, size, size, iconname, e)
                if util.file_readable(icon) then
                    return icon
                end
            end
            icon = d .. iconname .. '.' .. e
            if util.file_readable(icon) then
                return icon
            end
        end
    end
end

the string.format of icon paths should be as follows

for gnome / oxygen:
/usr/share/icons/gnome/32x32/apps/iconname.extension
so thats string.format("%s%ux%u/apps/%s.%s",...

However I use Faenza (a popular theme, which uses the following folder
order...

/usr/share/icons/Faenza/apps/32/iconname.extension
so thats string.format("%s/apps/%u/%s.%s",...

I believe the gnome/oxygen icon path is more popular though.

lastly another question, do we only want to look in the apps folder?
or do you also want to look at actions,  categories,  emblems,
mimetypes  status, devices,  extras, places, stock??

Thanks...

H


On 04/07/2014 06:42 PM, Harvey wrote:
> It looks like many programs are expecting naughty to parse through icons
> in /usr/share/icons/FOO/??x?? and find the icon corresponding to the
> name they insert.. but the current naughty behavior is to expect a full
> icon file name path..
> 
> Does anyone have any experience with which method is correct?
> Its not just ktorrent I'm seeing this behavior with
> 
> thanks!
> 
> On 04/06/2014 06:46 PM, Harvey wrote:
>> anyone else seeing allot of issues between gears/surface.lua and naughty
>> notifications??
>>
>> Seems like it can't find the icons to display with notifications more
>> often than on other releases..
>>
>>
>> naughty: Couldn't load image 'cantata':
>> /usr/share/awesome/lib/gears/surface.lua:37: Failed to open file
>> 'cantata': No such file or directory
>> naughty: Couldn't load image 'cantata':
>> /usr/share/awesome/lib/gears/surface.lua:37: Failed to open file
>> 'cantata': No such file or directory
>>
>>
> 
> 
> 



-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.

Reply via email to