From 92797c11b93d1d34ca277a477d5ab4c4010e6a94 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 25 Jun 2008 13:49:27 +0200 Subject: [PATCH] awesomerc: use table for floating rules Signed-off-by: Julien Danjou --- awesomerc.lua.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 173cc09e..45f9c08b 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -32,6 +32,13 @@ layouts = "floating" } +-- Table of clients that should be set floating +floatings = +{ + ["mplayer"] = true, + ["pinentry"] = true +} + -- Color & Appearance definitions, we use these later to display things font = "sans 8" border_width = 1 @@ -317,10 +324,7 @@ function hook_manage(c) -- if they're not focusable, so set border anyway. c:border_set({ width = border_width, color = border_normal }) c:focus_set() - if c:name_get():lower():find("pinentry") then - c:floating_set(true) - end - if c:name_get():lower():find("mplayer") then + if floatings[c:name_get():lower()] then c:floating_set(true) end end