diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 1e35e228..f7d6fb63 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -382,8 +382,13 @@ end -- Hook function to execute when arranging the screen -- (tag switch, new client, etc) function hook_arrange(screen) - mylayoutbox[screen].text = - "" + local layout = awful.layout.get(screen) + if layout then + mylayoutbox[screen].text = + "" + else + mylayoutbox[screen].text = "No layout." + end -- If no window has focus, give focus to the latest in history if not client.focus_get() then