-
Notifications
You must be signed in to change notification settings - Fork 114
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
Rewrite it in Rust #317
Rewrite it in Rust #317
Conversation
Parse CLI options, including presets
Get distro name from neofetch
Generate distros.rs on build
Add some more scaffolding
[rust] implement list_distros match_condition method in rust
Clean up build.rs
Co-authored-by: Chiew Yan Wei <chiewyanwei@gmail.com>
Implement neofetch_util functions
Co-authored-by: Chiew Yan Wei <chiewyanwei@gmail.com> Co-authored-by: Tan Chee Keong <tanck2005@gmail.com>
Parse config
Apply lightness to preset color profile
Add more scaffolding
Implement recolored ascii output
e.g. back-to-back color codes, or color code at end of line
This removes the need to clear screen at each frame, which fixes the screen flickering.
Use "alternate screen" for Pride month animation
No more screen flickering: rust-malaysia#43 |
Hello it's possible to save backend choice in config? Looks like directly run without specify backend with |
@nexplorer-3e Backend choice is saved in config. You can even run with e.g. (Not the best experience on Termux, for example. If you don't pass |
Hyfetch will let user select the preferred backend, won't it? I think the backend should default to fastfetch on Windows, at least. |
@CarterLi I'll add some heuristics for selecting the default backend. UPDATE: Done. We now default to fastfetch except on non-Android *nix. The user should be able to tell they need to install UPDATE 2: Changed to just default to fastfetch if it's installed (on any platforms). |
Hello, |
@1337isnot1337 I think we just need to wait for @hykilpikonna to review and merge. Our work is done here, except for further improvements which could definitely be done as separate pull requests... |
* Use fastfetch on Android (Termux)
Otherwise fall back to neofetch.
Signed-off-by: Bailey Kasin <baileykasin@gmail.com>
Co-authored-by: Teoh Han Hui <teohhanhui@gmail.com>
kinda annoying if this becomes the only option, as older OSes sometimes won't have support for that rust version (i.e. my PowerMac G5 with macOS 10.5) |
@eleanordoesntcode While I'm sympathetic to that struggle, ultimately that's an unsupported platform that has been unmaintained for a long time now... The closest thing I could find with a quick Google search is this: https://www.wezm.net/v2/posts/2023/rust-on-ppc-classic-mac-os/ (the working approach that they found was to compile from Rust to WebAssembly, and then from WebAssembly to C, lol... and their target was Mac OS 9 🙈) |
/ping @hykilpikonna Have you had the chance to take a look at this rewrite yet? |
IMO it's not a great idea because in its current state the tool runs anywhere with just a bash environment. Rewriting it in Rust makes it non-portable and a hassle to get working in some exotic environments. |
@devnoname120 No, the current version needs Python (and |
Do note that this rewrite is for specifically |
Just published the last python release 1.99.0 and merged this PR. All future releases from this point will be in rust now. Thanks for all the great work! |
@teohhanhui I was mentioning my G5 before, and this G5 can run the latest version of Python. However Rust does not compile for this machine. There is more support for Python on older machines so your argument is invalid |
@eleanordoesntcode Sorry for the confusion. I was not trying to make an argument, just making a factual correction. But anyway, like I've said before, I'm sympathetic to trying to support as much old hardware as feasible. Perhaps we can consider doing the Rust (-> WASM) -> C build, then it should be truly portable. Another project to maybe keep an eye on: https://www.reddit.com/r/rust/comments/1bhajzp/rust_to_c_compiler/ (and the latest status update I could find: https://www.reddit.com/r/rust/comments/1e5vrrs/media_the_rust_to_net_compiler_backend_can_now/) Also to note:
So a bump in Python version requirement could easily have the same effect for your platform :( |
@teohhanhui This G5 runs macOS 10.5. Again, by compiling Python from source it works just fine. I'll keep an eye on those Rust to C projects. |
Description
Rewrite
hyfetch
(Python) in Rust.TODO:
--config
option to interactively create new config--june
option for the Pride month animation--backend
other thanneofetch
fastfetch
,fastfetch-old
replaced with a new backend - macchinaqwqfetch
(seems tricky... the integration was via importing theqwqfetch
Python library and calling a function)removed--c-overlay
option for experimental color overlay mode (probably remove as it's no longer useful)Relevant Links
#296
Screenshots
TBD
Additional context
TBD