From ed09461ee73a6dd89abcdd6fe38939ad98310080 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 21 Aug 2014 20:05:59 +0200 Subject: [PATCH] Only add rules for a second screen if there is one --- awesome/.config/awesome/rc.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index be0d0e1..60eff7b 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -423,14 +423,18 @@ awful.rules.rules = { properties = { fullscreen = true } }, { rule = { instance = "RogueLegacy.exe" }, properties = { fullscreen = true } }, - { rule = { class = "Conkeror" }, - properties = { tag = tags[2][1] } }, { rule = { class = "Emacs" }, properties = { tag = tags[1][1] } }, -- Set Firefox to always map on tags number 2 of screen 1. -- { rule = { class = "Firefox" }, -- properties = { tag = tags[1][2] } }, } + +if #tags > 1 then + awful.util.table.join(awful.rules.rules, + { { rule = { class = "Conkeror" }, + properties = { tag = tags[2][1] } } }) +end -- }}} -- {{{ Signals