hyprland-community / hyprnix

35 stars 0 forks source link

Bring config.windowRules up to parity with available windowrulev2 fields #6

Open chaorace opened 5 months ago

chaorace commented 5 months ago

Hello, I'm a big fan of this flake and I've been using it for 6+ months now! Thanks for the great work :100:

Currently, it seems that only the class and title Window Rule fields are supported when defining rules via config.windowRules. This makes it impossible to define rules based on the other fields supported by the rule system (e.g.: workspace-specific rules).

Window rule fields missing from config.windowRules

Per the wiki:

Workaround

windowrulev2 lines can be manually added to the Hyprland config via config.extraConfig:

    extraConfig = ''
      windowrulev2 = workspace special:spotify2 silent,title:Spotify Premium
      windowrulev2 = opacity 0.85 0.66,workspace:name:special:scratch
      windowrulev2 = noshadow,workspace:name:special:scratch
      windowrulev2 = float,workspace:name:special:scratch
    '';
spikespaz commented 5 months ago

Thank you for bringing this to my attention, and the detail! Also, thank you for using the flake! I was sure I was the only person. :smile: I'll make sure to update this right now!

chaorace commented 5 months ago

That would be excellent! Take all the time you need, of course & kudos once again for all of the effort you've invested into this. I use home-manager both inside and outside of NixOS and your flake has made my setup much, much easier to maintain.

Also, FWIW: Usage of this flake may already be more widespread than you think -- I originally came across this flake via someone else's config, actually.

spikespaz commented 5 months ago

Oh, well then I'd better be more careful and not just change whatever I want as I have been. Sorry if I've broken your computer in the past.

I have decided to give the mechanism behind the window/layer/workspace rules more attention, as my original work is quite sloppy. I'll make sure to be more conscientious in the future.

Thanks!