allow different os-releases and hyprland setup#1013
Conversation
koibtw
left a comment
There was a problem hiding this comment.
i think it might be a better idea to make one script and use
case "$PACKAGER" in
# ...but that's up to you
core/src/inner.rs
Outdated
| 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.
Isn't this what the previous file precondition was doing? See linux neptune for example
There was a problem hiding this comment.
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.
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 <adas1per@protonmail.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
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. |
| #!/bin/bash | ||
|
|
||
| echo "Hyprland JaKooLit" | ||
| git clone --depth=1 https://github.com/JaKooLit/Debian-Hyprland.git ~/Debian-Hyprland |
There was a problem hiding this comment.
|
i forgot to review the ubuntu script, just make similar changes there |
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>

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