From: Samir Benmendil Date: Wed, 26 Nov 2014 15:49:50 +0000 (+0000) Subject: awesome: pick tags based on screen.count instead of host X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/90362fab9d86a462d7a8cc6b471dff2da987cbdc awesome: pick tags based on screen.count instead of host --- diff --git a/awesome/rules.lua b/awesome/rules.lua index 3fe2c9f..a78a85f 100644 --- a/awesome/rules.lua +++ b/awesome/rules.lua @@ -1,16 +1,19 @@ local utils = require("utils") -if utils.host == "shada" then mediatag = tags[2][3] end -if utils.host == "chronos" then mediatag = tags[1][4] end +-- {{{ Rules +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.