]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/rules.lua
awesome: pick tags based on screen.count instead of host
[dotfiles.git] / awesome / rules.lua
index 765e79ae305870a884471c077fa3c4d5fbad329d..a78a85f24174449aff02015e7c67d67afb567db1 100644 (file)
@@ -1,17 +1,19 @@
 local utils = require("utils")
 
 -- {{{ Rules
-if utils.host == "shada"   then mediatag = tags[2][3] end
-if utils.host == "chronos" then mediatag = tags[1][4] end
+local sc = screen.count()
 
-if utils.host == "shada"   then wwwtag = tags[2][1] end
-if utils.host == "chronos" then wwwtag = tags[1][2] end
+if sc == 2 then mediatag = tags[2][3] end
+if sc == 1 then mediatag = tags[1][4] end
 
-if utils.host == "shada"   then imtag = tags[2][2] end
-if utils.host == "chronos" then imtag = tags[1][3] end
+if sc == 2 then wwwtag = tags[2][1] end
+if sc == 1 then wwwtag = tags[1][2] end
 
-if utils.host == "shada"   then socialtag = tags[2][4] end
-if utils.host == "chronos" then socialtag = tags[1][5] end
+if sc == 2 then imtag = tags[2][2] end
+if sc == 1 then imtag = tags[1][3] end
+
+if sc == 2 then socialtag = tags[2][4] end
+if sc == 1 then socialtag = tags[1][5] end
 
 awful.rules.rules = {
     -- All clients will match this rule.
@@ -34,14 +36,11 @@ awful.rules.rules = {
                      skip_taskbar = true,
                      ontop = true,
                      x = 1920 - 310, y = mywibox[mouse.screen].height,
-                     height = 100, width = 100 } },
-    { rule = { class = "Clementine" },
-      properties = { tag = mediatag,
-                     switchtotag = true } },
+                     width = 100, height = 100 } },
     { rule = { class = "URxvt", instance = "mutt" },
       properties = { tag = wwwtag,
                      function (c) awful.client.setslave(c) end } },
-    { rule = { class = "Dwb", type = "normal", instance = "dwb" },
+    { rule = { class = "Dwb", type = "normal", instance = "dwb-default" },
       properties = { tag = wwwtag,
                      function (c) awful.client.setmaster(c) end } },
     { rule = { class = "Dwb", type = "normal", instance = "dwb-social" },
@@ -49,10 +48,12 @@ awful.rules.rules = {
     { rule = { class = "URxvt", instance = "ncmpcpp" },
       properties = { tag = mediatag,
                      function (c) awful.client.setmaster(c) end } },
+    { rule = { class = "URxvt", instance = "mopidy" },
+      properties = { tag = mediatag,
+                     function (c) awful.client.setmaster(c) end } },
     { rule = { class = "URxvt", instance = "weechat" },
       properties = { tag = imtag,
                      function (c) awful.client.setmaster(c) end } },
     { rule = { class = "Steam" },
       properties = { tag = tags[1][9] } },
 }
--- }}}