Pyprland makes all chromium instances started with --app switch floating
Closed this issue · 2 comments
Pyprland version
2.0.4
Describe the bug
I use chromium instances with the --app switch for a lot of my daily apps (like discord,element,teams,spotifiy,...).
eg.:
[scratchpads.spotify]
animation = "fromRight"
command = "chromium --class=Spotify --user-data-dir=$HOME/.cache/chromium/spotify-webApp --app=https://open.spotify.com/"
class = "Spotify"
size = "50% 80%"
lazy = true
unfocus = "hide"
These work flawlessly. But i also use chromium webApp instances for stuff like outlook where i don't want them in a scratchpad. But if i exec any other chromium with the --app switch set the spawning Window starts in a floating state.
To Reproduce
- Add a Scratchpad as shown in above example
- Open a different chromium instance via shell, hotkey or launcher with --app switch active
eg.:
$ chromium --class=Discord --user-data-dir=$HOME/.cache/chromium/discord-webApp --app=https://discord.com/app
- New window starts in floating state.
Expected behavior
New window with different class Name should not start in a floating state
Hi, I think it's unrelated to the "--app" switch, it's related to the classes.
Once you have a scratchpad "well configured" providing the class
property, every matching window will be affected. Here you should remove or change your --class
command-line option.
Can you use hyprctl clients -j
to verify the class works as you expect ? I don't see how this can happen if the "class" is properly set...
A quick test here seems to show that if you provide launch chrom(e|ium) this way:
--class=XXXX --user-data-dir=/tmp/ --app=https://yahoo.com/
it will start floating, but if you set --app=about:blank instead of a valid URL it will be tiled/not-floating.
I guess you then need to force the floating state in the hyprland.conf for those apps... I don't think pyprland has any role here... but feel free to prove me wrong.
Please reopen if my comments didn't help and you find a problem in pyprland.
Thank you for the report, I may better document the "chrome apps" in the future.
Feel free to make a proposition :)