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

core: handle scoped keywords if flags are not allowed #49

Merged
merged 4 commits into from
Jul 7, 2024

Conversation

aurelien-brabant
Copy link
Contributor

I was playing with Hyprlang to handle configuration for a project of mine and found out that keywords inside categories are not properly handled (they are simply being ignored).

I added tests to make sure only the correctly scoped keywords are calling the handler.

@aurelien-brabant aurelien-brabant force-pushed the feat/handle-scoped-keywords branch from 5c7e216 to 06ad22c Compare July 5, 2024 22:23
@vaxerski
Copy link
Member

vaxerski commented Jul 6, 2024

also rebase on main to fix ci

@aurelien-brabant aurelien-brabant force-pushed the feat/handle-scoped-keywords branch from 93a85ea to 6f57ba5 Compare July 6, 2024 14:42
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@fufexan
Copy link
Member

fufexan commented Jul 7, 2024

@vaxerski you forgot to merge.

@vaxerski
Copy link
Member

vaxerski commented Jul 7, 2024

no I totally didnt

@vaxerski vaxerski merged commit 095f54b into hyprwm:main Jul 7, 2024
7 checks passed
@zjeffer
Copy link

zjeffer commented Jul 7, 2024

After updating my whole system with paru, this config stopped working:

animations {
  enabled = true

  # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
  animation = windows, 1, 1, default
  animation = windowsOut, 1, 2, default
  animation = border, 1, 5, default
  animation = borderangle, 1, 8, default
  animation = fade, 1, 3, default
  animation = workspaces, 1, 4, default
  animation = specialWorkspace, 1, 4, default, slidevert
}

I get the config error config option <animations.animation> does not exist.

Instead, I now have to do this:

animations {
  enabled = true
}
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
animation = windows, 1, 1, default
animation = windowsOut, 1, 2, default
animation = border, 1, 5, default
animation = borderangle, 1, 8, default
animation = fade, 1, 3, default
animation = workspaces, 1, 4, default
animation = specialWorkspace, 1, 4, default, slidevert

I believe this commit is responsible.

@vaxerski
Copy link
Member

vaxerski commented Jul 7, 2024

hm, right. General keywords should be unscoped. Gimme sec.

@vaxerski
Copy link
Member

vaxerski commented Jul 7, 2024

fixed and added a test case: 5df0174

if you want your keyword to only work in global scope (not in categories) prefix it with :

:globalScopeOnly
anyScope
category:onlyThisCat

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

Successfully merging this pull request may close these issues.

4 participants