Monday 27 May 2019

rules - Awesome Window Manager - Open Chromium Developer Tools on Different Screen Than Chromium


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] } },
}

Answer



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] } }
}

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...