awesomerc: use table for floating rules

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-25 13:49:27 +02:00
parent 3e6dbd64ee
commit 92797c11b9
1 changed files with 8 additions and 4 deletions

View File

@ -32,6 +32,13 @@ layouts =
"floating" "floating"
} }
-- Table of clients that should be set floating
floatings =
{
["mplayer"] = true,
["pinentry"] = true
}
-- Color & Appearance definitions, we use these later to display things -- Color & Appearance definitions, we use these later to display things
font = "sans 8" font = "sans 8"
border_width = 1 border_width = 1
@ -317,10 +324,7 @@ function hook_manage(c)
-- if they're not focusable, so set border anyway. -- if they're not focusable, so set border anyway.
c:border_set({ width = border_width, color = border_normal }) c:border_set({ width = border_width, color = border_normal })
c:focus_set() c:focus_set()
if c:name_get():lower():find("pinentry") then if floatings[c:name_get():lower()] then
c:floating_set(true)
end
if c:name_get():lower():find("mplayer") then
c:floating_set(true) c:floating_set(true)
end end
end end