Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
9 tasks
chaorace opened this issue Mar 13, 2024 · 3 comments
Open
9 tasks

Comments

@chaorace
Copy link

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

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:

  • workspace (name/id)
  • onworkspace (integer)
  • initialClass (regex)
  • initialTitle (regex)
  • floating (boolean)
  • focus (boolean)
  • fullscreen (boolean)
  • pinned (boolean)
  • xwayland (boolean)

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
Copy link
Member

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. 😄 I'll make sure to update this right now!

@chaorace
Copy link
Author

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
Copy link
Member

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants