pyprland: Bug: Multiple chrome PWA apps in scratchpad
Some applications don’t provide native linux experience and are installed as PWAs (e.g. google meet, yt music, amplenote).
The problem is that currently only 1st PWA application works in a scratchpad, and others give an error:
/Failed to show scratch. The command terminated successfully, is it already running
.
I believe this is because chrome reuses the same process id when running multiple applications. In sway I was just launching the apps and then matched them by app_id that is specific for each application, but it doesn’t seem to work here.
Here is a snippet from my config:
[scratchpads.amplenote]
animation = "fromBottom"
command = "/opt/google/chrome-beta/google-chrome-beta --profile-directory=Default --app-id=pfphgelppkenhllngngioolkaeelhlmi"
class = "chrome-pfphgelppkenhllngngioolkaeelhlmi-Default"
class_match = true
size = "50% 80%"
lazy = true
[scratchpads.ytmusic]
animation = "fromBottom"
command = "/opt/google/chrome-beta/google-chrome-beta --profile-directory=Default --app-id=cinhimbnkkaeohfgghhklpknlkffjgod"
class = "chrome-cinhimbnkkaeohfgghhklpknlkffjgod-Default"
class_match = true
size = "50% 80%"
lazy = true
unfocus = "hide"
Thank you for your help and this amazing project!
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 29
Commits related to this issue
- Add experimental support for PWA (#31) — committed to hyprland-community/pyprland by fdev31 7 months ago
of course I’m happy to test!
following, will be able to test on nixOS
It works great now, thank you very much!
At first, I encountered problems but I solved them by setting
float
withwindowrule
in myhyprland.conf
. It is mentioned in the documentation but things worked for me without setting it for other apps. Maybe something to mention in the docs?Also noticed the config param name is still
pwa_hack
, but we discussed other names above.Thanks again!
Thank you for that!
lazy
is fine to start them. I agreepwa_hack
is not the best name. I likeis_pwa
but it may also be the case for some non-pwa apps (even though i don’t know any), so maybe something likeshared_pid
?I also use something similar to you - one of the apps I have in scratchpad is
wavebox
which is based on chrome where I have all messengers in web version (slack, discord, whatsapp, telegram, fb messenger, 3xgmail, twitter + calendar). But for some of the apps I need to go straight to them, or I need to be able to have them opened together with that shared browser window, for example, slack and my note app.yes, this log is from fresh boot.
It should be easy to reproduce, just go and install a couple of PWA apps, for example youtube music and google meet. To install the app go to the app page:
And click
Install
icons that should appear in the address bar:This should add an entry to your launcher (in my case it created a
.desktop
file in~/.local/share/applications
dir). From that desktop file I got theexec
command how to run application.