Fix 'no such file' errors for icons (#1655)
Fixes https://github.com/awesomeWM/awesome/issues/1650. Signed-off-by: Lego Stax legostax@gmail.com
This commit is contained in:
parent
008bd185ba
commit
7c775e967c
|
@ -615,13 +615,14 @@ function titlebar.widget.button(c, name, selector, action)
|
||||||
if img ~= "" then
|
if img ~= "" then
|
||||||
prefix = prefix .. "_"
|
prefix = prefix .. "_"
|
||||||
end
|
end
|
||||||
if ret.state ~= "" then
|
local state = ret.state
|
||||||
img = img .. "_"
|
if state ~= "" then
|
||||||
|
state = "_" .. state
|
||||||
end
|
end
|
||||||
-- First try with a prefix based on the client's focus state,
|
-- First try with a prefix based on the client's focus state,
|
||||||
-- then try again without that prefix if nothing was found,
|
-- then try again without that prefix if nothing was found,
|
||||||
-- and finally, try a fallback for compatibility with Awesome 3.5 themes
|
-- and finally, try a fallback for compatibility with Awesome 3.5 themes
|
||||||
local theme = beautiful["titlebar_" .. name .. "_button_" .. prefix .. img .. ret.state]
|
local theme = beautiful["titlebar_" .. name .. "_button_" .. prefix .. img .. state]
|
||||||
or beautiful["titlebar_" .. name .. "_button_" .. prefix .. img]
|
or beautiful["titlebar_" .. name .. "_button_" .. prefix .. img]
|
||||||
or beautiful["titlebar_" .. name .. "_button_" .. img]
|
or beautiful["titlebar_" .. name .. "_button_" .. img]
|
||||||
or beautiful["titlebar_" .. name .. "_button_" .. prefix .. "_inactive"]
|
or beautiful["titlebar_" .. name .. "_button_" .. prefix .. "_inactive"]
|
||||||
|
|
Loading…
Reference in New Issue