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

config: fix gradient rgb(a) parsing with spaces (for real this time) #628

Merged
merged 2 commits into from
Jan 1, 2025

Conversation

PaideiaDilemma
Copy link
Collaborator

@PaideiaDilemma PaideiaDilemma commented Dec 30, 2024

Closes #622
I missed that Hyprland does not support spaces for rgb(a) either and somehow i thought i broke it. So it is broken since gradients were added.

Not the best fix, but the simplest. Should I add this in Hyprland as well?

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.

this wont accept 1, 2 why not just trim()?

@PaideiaDilemma
Copy link
Collaborator Author

PaideiaDilemma commented Dec 31, 2024

We can do that, but i need to seperate individual gadient colors differently (currently split by spaces) and then change configStringToInt to support it.
Or have an extra loop to parse out the spaces only in between rgb(a)( here )

@PaideiaDilemma
Copy link
Collaborator Author

Tested

grad =   rgba(21, 39, 60, 0.2) rgba(21, 39, 60, 0.8) rgba(200, 200, 200, 0.5) rgba(21, 39, 60, 0.8) rgba(200, 200, 200, 0.5) rgba(21, 39, 60, 0.8) rgba(200, 200, 200, 0.5) 45deg
grad = rgba(255, 0, 0,    0.5)    rgb(255, 0,  0)
grad = 0x00FF00 0x00FF00  0xFF00FF00 45deg asdfklajsdflakjsdflk
grad = rgba(255, 0, 0,    0.5) rgb(b3ff1a) rgba(b3ff1aee)
grad = rgb(200,200, 200)  #trailing spaces

@vaxerski vaxerski merged commit a2f00fb into hyprwm:main Jan 1, 2025
1 check passed
vaxerski pushed a commit that referenced this pull request Jan 23, 2025
…628)

* config: fix gradient rgb(a) parsing with spaces (for real this time)

* config: conditionally split gradient colors
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.

Error parsing gradient
2 participants