Open hexchain opened 7 years ago
For now your manually added strings is the best solution I think. That's actually using the utils
icon lookup (one of the three in the codebase).
menubar is in need of a rewrite anyway; it's on the todo list. Handling unorthodox directory names is a good thing to watch out for though.
I noticed that menubar/utils.lua
only searches for particular icon types; apps and categories. Presumably these are only icons that are fit for an application menu?
I think perhaps this bug should be turned into a feature request for generic icon search interface.
local function get_icon_lookup_path()
...
local app_in_theme_paths = {}
for _, icon_theme_directory in ipairs(icon_theme_paths) do
for _, size in ipairs(all_icon_sizes) do
table.insert(app_in_theme_paths,
glib.build_filenamev({ icon_theme_directory,
size, 'apps' }))
table.insert(app_in_theme_paths,
glib.build_filenamev({ icon_theme_directory,
size, 'categories' }))
end
end
...
My related issue and a slight workaround is here.
i have smth similar in my local config:
Output of
awesome --version
:awesome v4.1 (Technologic) • Compiled against Lua 5.3.4 (running with Lua 5.3) • D-Bus support: ✔ • execinfo support: ✔ • xcb-randr version: 1.5 • LGI version: 0.9.1
How to reproduce the issue:
theme.lua
Actual result:
No icon if
.desktop
does not specify one.Expected result:
Menubar items are shown with correct icon.
By poking around in
lib/menubar
I guess awesome does not support unnormal size names for directory. A hardcoded table limits all possible directory names but Numix project uses special ones:Actually there are code for
index.theme
parsing (and per Icon Theme Specification the correct way to find icon in a theme is to read that index file for possible paths), but it seems not used for application icons, only for category icons.Manually adding 16, 22, 24 and 48 to
all_icon_sizes
table makes it work as expected but that's probably not the right solution.