Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have three screens. One is for URxvt and VIM, another is for Chromium, Firefox, and Opera, and the third is for Chromium's Developer Tools. Below are the rules I've created in my rc.lua in an attempt to create this behavior. It works if I already have the windows open and I relaunch awesome, but the Developer Tools rule doesn't apply when I hit Ctrl+Shift+I within Chromium to launch the Developer Tools window. Instead, it is treated the same as any other new Chromium window and is placed on the first screen. Even if I comment out the Chromium rule, the Developer Tools window still isn't affected by the rule I setup for it, unless I relaunch awesome.

awful.rules.rules = {
    { rule = { },
      properties = { border_width = beautiful.border_width,
                     border_color = beautiful.border_normal,
                     focus = awful.client.focus.filter,
                     keys = clientkeys,
                     buttons = clientbuttons } },
    { rule = { class = "URxvt" },
      properties = { tag = tags[2][1],
                     size_hints_honor = false } },
    { rule = { class = "Chromium" },
      properties = { tag = tags[1][1] } },
    { rule = { class = "Firefox" },
      properties = { tag = tags[1][1] } },
    { rule = { class = "Opera" },
      properties = { tag = tags[1][1] } },
    { rule = { name = "Developer Tools" },
      properties = { tag = tags[3][1] } },
}
share|improve this question

1 Answer 1

up vote 1 down vote accepted

I managed to work around the issue by targeting the windows role instead of the name. I also made the rules more succinct by using rule_any for the identical browser rules.

awful.rules.rules = {
    { rule = { },
      properties = { border_width = beautiful.border_width,
                     border_color = beautiful.border_normal,
                     focus = awful.client.focus.filter,
                     keys = clientkeys,
                     buttons = clientbuttons } },

    { rule = { class = "URxvt" },
      properties = { tag = tags[2][1],
                     size_hints_honor = false } },

    { rule_any = { class = { "Chromium-browser", "Firefox", "Opera" } },
      properties = { tag = tags[1][1] } },

    { rule = { class = "Chromium-browser", role = "pop-up" },
      properties = { tag = tags[3][1] } }
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.