-
Notifications
You must be signed in to change notification settings - Fork 245
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
allow different os-releases and hyprland setup #1013
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it might be a better idea to make one script and use
case "$PACKAGER" in
# ...
but that's up to you
SystemDataType::FileContains { file, contains } => { | ||
std::fs::read_to_string(file) | ||
.map(|content| content.contains(contains) == *matches) | ||
.unwrap_or(false) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this what the previous file precondition was doing? See linux neptune for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me test that out, for some odd reason I thought that was just matching the entire value of the file. It was late and I probably just missed this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it iterated through values[] and ensured each was contained within the file.
I feel as though the 'contains' in the FileContains variant also is redundant, given values[] already stores strings to validate.
I would personally keep the previous implementation of the File precondition (perhaps renaming it to FileContains) and create a new FileExists precondition, which would match the pattern with the existing CommandExists.
Hi Chris. Im glad you liked the setup :) just for clarification, Ubuntu 24.04 hyprland installation is via source and latest Hyprland I could make it work is v0.39 24.10 and 25.04 (beta) have hyprland in their universe repo so can just install via apt thats the reason why I set a different branch for different Ubuntu release. so probably best that for Ubuntu, if release is the current 24.04 LTS, to pull from 24.04 |
Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Adam Perkowski <[email protected]>
I need to differentiate between Ubuntu and Debian... Also some scripts can only be run on certain version... like ubuntu 22 vs ubuntu 24. This adds flexibility to those preconditions so it won't allow scripts to run on versions it won't be compatible with. |
Type of Change
Description
Allows new type of tab data that can read files like /etc/os-release to add versioning preconditions for some scripts.
Also adds Hyprland setup script from @JaKooLit
Testing
Cargo run done on ubuntu 24 laptop and an arch linux desktop
Checklist