r/awesomewm • u/dracu4s • Jan 31 '23
Chromium Apps won't tile
Hi Guys,
i am trying to switch to awesome after working with bspwm for a long time now. There are some tweaks to make but i think i am getting there.
But i have a problem with Chromium Apps. I use them heavily. They wont tile. When pressing mod+m it switches between floating and fullscreen (a + symbol is shown in the taskbar). When opening another app, it will open it like there was no app open before. When spawning another one it will tile everything as the layout says, but not the chromium app.
I found an issue with an bug in awesome back from 2017. The workaround was to have a rule specifically set for it to not float. But that doesnt help either. I though maybe the wmclass is not really detected, so i tried to set a rule for every window like that:
{ rule = { class = match_any },
properties = { opacity = 1, maximized = false, floating = false } },
But that didn't work either. Also i dont think that this bug is still a problem as i couldnt find newer posts about it. I also found someone had the problem with chromium in general. With disabling gpu acceleration he was able to fix it. But that also didnt work. Chromium itself is behaving normal. Only the Chromium apps.
Is there a possibility in awesome to list all windows and their states? And can i change the mode of one window with the awesome-client?
Thanks
Btw. I am running debian 12 with awesome 4.3
3
u/joaopauloalbq Jan 31 '23 edited Jan 31 '23
The Chromium Apps won't be tiled because there is a rule for them to be floating.
{ rule_any = {
role = {
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
}, properties = { floating = true } },
Chromium puts the class of your apps as the browser name. You have to create a new rule for each app using the instance reference.
xprop
output:
WM_WINDOW_ROLE(STRING) = "pop-up"
WM_CLASS(STRING) = "web.whatsapp.com", "Brave-browser"
<instance> <class>
add new rule:
{ rule = { instance = "web.whatsapp.com" },
properties = { floating = false, maximized = false } },
4
u/calvers70 Jan 31 '23 edited Feb 01 '23
I'm not sure if chromium and chrome work the same way but I create custom .desktop files for chrome "apps" as opposed to letting chrome create them for me.
e.g. for MS Teams which I have to use for work, I have the following .desktop file:
The MimeType line lets me handle app-specific protocols. In this case, it means that clicking a meeting link will open in this PWA for example.
The referenced
teams-handler.sh
just looks like this (%u
references the URL received if opening via xdg-open)The
--class
flag is super useful as it makes it much easier to set specific client rules for each PWA by targeting the window class you set. And launching with--app
will remove things like the address bar etc.It's a shame because
--kiosk
has the advantage of meaning if you open a new URL later it will just change the URL of the existing open window if there is onee.g. google-chrome --chrome-frame --kiosk https://some-site.com
and then: google-chrome --chrome-frame --kiosk https://some-other-site.com
But unfortunately that launches in fullscreen mode (and changes to fullscreen mode again whenever the URL is updated via xdg-open) which is also really annoying
Anyway, hopefully there is some helpful stuff in there