hyprland-community / pyprland

Scratchpads & many goodies for Hyprland [maintainer=@fdev31]
MIT License
345 stars 15 forks source link

[BUG] Scratchpads and file managers (Nemo, Nautilus) #98

Closed gvolpe closed 4 months ago

gvolpe commented 4 months ago

Pyprland version 2.2.12

Describe the bug I'm trying to set up a scratchpad for a file manager: Nemo --- also tried Nautilus and experienced the same problem. I set up a binding on Hyprland which actually works and the file manager shows up as expected.

The issue is with other spawned windows from the main process are not displayed, and in some cases, it makes the file manager freeze (when trying to delete a file). For instance, when clicking on File -> Properties or Edit -> Preferences, a new window should open, but this doesn't work when set up as a scratchpad.

I went through the "Advanced" and "Non-Standard" scratchpads documentation, but didn't find any thing that would help.

Not sure if this is a bug or just not supported, but thought I'd raise an issue as I couldn't find any other reports.

To Reproduce Steps to reproduce the behavior:

  1. Set up Nemo or Nautilus as a scratchpad, as indicated in the pyprland.toml (the program needs to be installed).
  2. Open the file manager and try to click on any file's properties or open the preferences.
  3. Expected window is not displayed.

Expected behavior I would expect the child windows to show up, as they do when they are not a scratchpad.

Configuration (provide following files/samples when relevant):

[pyprland]
plugins = [
  "scratchpads"
]

[scratchpads.filemanager]
animation = ""
command = "nemo"
class = "nemo"
lazy = false
unfocus = "hide"
size = "60% 60%"
margin = 0

Additional context Add any other context about the problem here.

fdev31 commented 4 months ago

Can you try the latest version? Better multi window support have been implemented...

fdev31 commented 4 months ago

I also recommend that you have a dedicated file manager for the scratchpad..if you play with many windows moving them in different workspaces or screens etc you may run into trouble.

gvolpe commented 4 months ago

Thanks for the quick response! Will try this evening when I get back home and report back.

I also recommend that you have a dedicated file manager for the scratchpad

Can you elaborate? Do you mean using either Nemo or Nautilus?

fdev31 commented 4 months ago

Thanks for the quick response! Will try this evening when I get back home and report back.

I also recommend that you have a dedicated file manager for the scratchpad

Can you elaborate? Do you mean using either Nemo or Nautilus?

I mean using one only as a scratchpad, if you plan multi windowing etc use a second one

gvolpe commented 4 months ago

if you plan multi windowing etc use a second one

Sorry, don't understand 😄 Do you mean a second scratchpad with different config?

Can you try the latest version? Better multi window support have been implemented...

I tried 2.2.16, same issue even with multi = false. Is there a particular configuration I should use for multi-window support?

fdev31 commented 4 months ago

Hm, I was hoping this one would help with the default values (multi enabled by default). It should keep track of every window... that's not the case ? (eg: if you "hide", every window should hide) If that's not working, you may consider using match_by option (eg: match_by="class").

I don't think I'll have time for it today, but I'm a nemo user, so I'll try to have a look at its behavior under a scratchpad.

fdev31 commented 4 months ago

Ok, I understand what's going on... will make a patch to make some processing optional, are you able to use the git version to provide some feedback when I do so?

fdev31 commented 4 months ago

If you can run the latest git version, try such config as a base:

[scratchpads.filemanager]
animation = "fromBottom"
command = "nemo"
class = "nemo"
size = "60% 60%"
skip_windowrules = ["aspect", "workspace"]

I'll need to introduce this new parameter and document things in the troubleshooting section. I also added a tiny fix for "multi" which was needed for your use case.

gvolpe commented 4 months ago

Sure! Should I try the latest commit from main or a branch? Last commit was yesterday it seems

fdev31 commented 4 months ago

Haha, thanks for the heads-up, in the "hurry" I forgot to push :p Just pushed it on the main branch!

fdev31 commented 4 months ago

PS: you need to restart Hyprland for this patch to apply, since it's about rules set into hyprland... and they need to be cleared.

gvolpe commented 4 months ago

It works! 🥳 Thanks for the quick workaround 🙏🏽

fdev31 commented 4 months ago

I'll keep it open some time to collect issues with this, I expect some tiny visual defects on start (mainly if you are not enabling lazy), you may also try to not skip "aspect", the workspace is the most important here. Some feedback would be great after you use it for some time.

fdev31 commented 4 months ago

Ok, looks like there are no remaining problems? Can I close this issue?

fdev31 commented 4 months ago

Check 2.2.19, should work without any complication in the config. Re-open in case of trouble of course :)