--------------------------------------------------------------------------- -- @author Julien Danjou <julien@danjou.info> -- @copyright 2009 Julien Danjou -- @release @AWESOME_VERSION@ --------------------------------------------------------------------------- -- Grab environment we need local client = client local table = table local type = type local ipairs = ipairs local pairs = pairs local aclient = require("awful.client") local atag = require("awful.tag") --- Apply rules to clients at startup. module("awful.rules") --- This is the global rules table. --
You should fill this table with your rule and properties to apply.
-- For example, if you want to set xterm maximized at startup, you can add:
--
--
-- { rule = { class = "xterm" },
-- properties = { maximized_vertical = true, maximized_horizontal = true } }
--
--
If you want to set mplayer floating at startup, you can add:
--
--
-- { rule = { name = "MPlayer" },
-- properties = { floating = true } }
--
--
If you want to put Firefox on a specific tag at startup, you
-- can add:
--
--
-- { rule = { instance = "firefox" },
-- properties = { tag = mytagobject } }
--
--
If you want to put Emacs on a specific tag at startup, and
-- immediately switch to that tag you can add:
--
--
-- { rule = { class = "Emacs" },
-- properties = { tag = mytagobject, switchtotag = true } }
--
--
If you want to apply a custom callback to execute when a rule matched, you
-- can add:
--
--
-- { rule = { class = "dosbox" },
-- callback = awful.placement.centered }
--
--
Note that all "rule" entries need to match. If any of the entry does not -- match, the rule won't be applied.
--If a client matches multiple rules, their applied in the order they are -- put in this global rules table. If the value of a rule is a string, then the -- match function is used to determine if the client matches the rule.
-- -- To match multiple clients to a rule one need to use slightly different
-- syntax:
--
--
-- { rule_any = { class = { "MPlayer", "Nitrogen" }, instance = { "xterm" } },
-- properties = { floating = true } }
--
--
To match multiple clients with an exception one can couple 'except' or
-- 'except_any' with the rules:
--
--
-- { rule = { class = "Firefox" },
-- except = { instance = "Navigator" },
-- properties = {floating = true},
-- },
--
--
--
-- { rule_any = { class = { "Pidgin", "Xchat" } },
-- except_any = { role = { "conversation" } },
-- properties = { tag = tags[1][1] }
-- }
--
--
-- { rule = {},
-- except_any = { class = { "Firefox", "Vim" } },
-- properties = { floating = true }
-- }
--
--