awesomerc: support no layout

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-11 18:20:00 +02:00
parent b655f6348c
commit e5c38ad17f
1 changed files with 7 additions and 2 deletions

View File

@ -382,8 +382,13 @@ end
-- Hook function to execute when arranging the screen -- Hook function to execute when arranging the screen
-- (tag switch, new client, etc) -- (tag switch, new client, etc)
function hook_arrange(screen) function hook_arrange(screen)
mylayoutbox[screen].text = local layout = awful.layout.get(screen)
"<bg image=\"@AWESOME_ICON_PATH@/layouts/" .. awful.layout.get(screen) .. "w.png\" resize=\"true\"/>" if layout then
mylayoutbox[screen].text =
"<bg image=\"@AWESOME_ICON_PATH@/layouts/" .. awful.layout.get(screen) .. "w.png\" resize=\"true\"/>"
else
mylayoutbox[screen].text = "No layout."
end
-- If no window has focus, give focus to the latest in history -- If no window has focus, give focus to the latest in history
if not client.focus_get() then if not client.focus_get() then