Permalink
Browse files

Cleaner/saner separation of rules for gamex / not

  • Loading branch information...
Russell Pickett
Russell Pickett committed Apr 2, 2012
1 parent bb54f83 commit 86d00ac7b24c6846aa9c2b051f6414f5bf9b4660
Showing with 23 additions and 22 deletions.
  1. +23 −22 .config/awesome/rules.lua
View
@@ -1,25 +1,26 @@
require("awful.rules")
+require("beautiful")
-if gamex() then
- awful.rules.rules = {
- { rule = { },
- properties = { keys = clientkeys,
- buttons = clientbuttons } },
- }
-else
- awful.rules.rules = {
- -- All clients will match this rule.
- { rule = { },
- properties = { border_width = beautiful.border_width,
- border_color = beautiful.border_normal,
- focus = true,
- keys = clientkeys,
- buttons = clientbuttons } },
- { rule = { class = "MPlayer" }, properties = { floating = true } },
- { rule = { class = "pinentry" }, properties = { floating = true } },
- { rule = { class = "gimp" }, properties = { floating = true } },
- { rule = { class = "Pavucontrol" },
- properties = { floating = true },
- callback = awful.placement.centered },
- }
+-- all screens
+awful.rules.rules = {
+ { rule = { },
+ properties = { border_width = beautiful.border_width,
+ border_color = beautiful.border_normal,
+ focus = true,
+ keys = clientkeys,
+ buttons = clientbuttons } },
+ { rule = { instance = "pylotro.exe" }, properties = { floating = true } },
+}
+
+-- not for game/wine X server
+if not gamex() then
+ awful.rules.rules = awful.util.table.join(
+ awful.rules.rules,
+ {
+ { rule = { class = "MPlayer" }, properties = { floating = true } },
+ { rule = { class = "pinentry" }, properties = { floating = true } },
+ { rule = { class = "gimp" }, properties = { floating = true } },
+ { rule = { class = "Eog" }, properties = { floating = true } },
+ }
+ )
end

0 comments on commit 86d00ac

Please sign in to comment.