Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

feat: add tag dispacther and window rule

Open rtgiskard opened this issue 1 year ago • 7 comments

Describe your PR, what does it fix/add?

this resolves: https://github.com/hyprwm/Hyprland/issues/6079

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

  1. ~the tag rule will update tags which affect the rule matched by tag, may be a rule rescan after tag applied~
  2. ~dynamic tag shouldn't be permernant~
  3. ~tag matched rule not get executed right after tag is applied by dispatcher~
  4. hyprctl bash/fish/zsh completion is not synced yet, just not sure how to update

Is it ready for merging, or does it need work?

Likely to be ready except for the above note

rtgiskard avatar May 23 '24 15:05 rtgiskard

I'm using clangd v18.1.3, while the archlinux default clang is v17.0.6,

looks like the new clang-format does not agree with the old one, which cause the failure of code style check

rtgiskard avatar May 23 '24 15:05 rtgiskard

tags added via a dispatcher should be permanent though so those would not be tagged as dynamic I guess

vaxerski avatar May 23 '24 15:05 vaxerski

Well, I'll check later, I need to have a late-night snack. 😂

rtgiskard avatar May 23 '24 15:05 rtgiskard

Dynamic tag is implemented with a * suffix compared to static tag via dispatcher.

Tag rule will queue another rescan for window rules, while tag from tag will not be queued for another rescan to avoid infinite recursion like this:

windowrulev2 = tag code, tag:cpp
windowrulev2 = opacity 0.7, tag:code

though, it would be ok with this if allow tag from tag recursion:

windowrulev2 = tag +code, tag:cpp
windowrulev2 = opacity 0.7, tag:code    #4

With current implementation, #4 will not execute in the first place.


fixed, no rescan with latest implementation

rtgiskard avatar May 24 '24 08:05 rtgiskard

~Now tags works perfect, seems to be ready~

rtgiskard avatar May 25 '24 12:05 rtgiskard

Now tags works perfect, seems to be ready

rtgiskard avatar May 25 '24 12:05 rtgiskard

Doc for tag is updated here: https://github.com/hyprwm/hyprland-wiki/pull/660

rtgiskard avatar May 25 '24 14:05 rtgiskard

class CTagKeeper but file TagKeeper (just like everything else) and then gtg

vaxerski avatar May 27 '24 20:05 vaxerski

class CTagKeeper but file TagKeeper (just like everything else) and then gtg

Well, mistake. By the way, would you like to try the bleeding-edge cpp modules?

rtgiskard avatar May 28 '24 03:05 rtgiskard

nope, time will come for them in the future thugh prolly

vaxerski avatar May 28 '24 21:05 vaxerski