paleofetch icon indicating copy to clipboard operation
paleofetch copied to clipboard

(WIP) Bedrock Linux Support

Open Titaniumtown opened this issue 4 years ago • 40 comments

Ok, I am new to C so be easy on me (that's also why my code is messy), lol. I did everything to add bedrock linux support, but I just don't now how I could implement multiple logos with the main function in paleofetch.c help needed!

I also stole the ascii art from neofetch.

Titaniumtown avatar May 04 '20 01:05 Titaniumtown

What is in the /bedrock/etc/or-release file? How does it differ from the regulr /etc/os-resease file? I'm not really familiar with bedrock linux

ss7m avatar May 04 '20 01:05 ss7m

I was thinking of adding a CMake option for each distro but my PR was closed. #5

otreblan avatar May 04 '20 01:05 otreblan

@sam-barr that shows what bedrock linux version you're on. /etc/os-release shows the default linux distro running over top of bedrock linux.

Titaniumtown avatar May 04 '20 01:05 Titaniumtown

@otreblan I don't think that's related to this PR though. Maybe put that in Issues?

Titaniumtown avatar May 04 '20 01:05 Titaniumtown

@sam-barr have any idea how I could implement multiple logos in the main function?

Titaniumtown avatar May 04 '20 01:05 Titaniumtown

#60

otreblan avatar May 04 '20 02:05 otreblan

As it stands now the logo is decided at compile time, and I'm not really looking to change that behavior at the moment.

allisio (not sure how to tag them in this) has written some stuff w.r.t package managers which includes logic based on the distro. If/when they make a pull request with that this extra business with bedrock linux could probably be added onto that.

ss7m avatar May 04 '20 02:05 ss7m

My current code seems to not work. It compiles, but when I run it, it crashes. Can anyone else reproduce the issue? is it a simple mistake? I am new to C

Titaniumtown avatar May 04 '20 17:05 Titaniumtown

wrong button, lol

Titaniumtown avatar May 04 '20 17:05 Titaniumtown

So the logo part is still not working and I think it get's quite complicated and needs rethinking and some code changes. Maybe it would be best to narrow this pull request down to only add the bedrock name stuff and tackle the integration of other logos later?

dwzg avatar May 05 '20 21:05 dwzg

Would I just close the PR and create 2 new ones?

Titaniumtown avatar May 05 '20 21:05 Titaniumtown

Has anyone figured out how the logo can be decided on run time?

Titaniumtown avatar May 10 '20 01:05 Titaniumtown

I really want multi-os support!

Titaniumtown avatar May 10 '20 01:05 Titaniumtown

Bump. Anyone think of any ideas to fix this issue?

Titaniumtown avatar May 12 '20 17:05 Titaniumtown

image Because LOGO is a pointer, COUNT() is returning 64/64=1. ARCH_LOGO instead is an array so it return the correct value.

otreblan avatar May 12 '20 21:05 otreblan

image When using a #define, COUNT() returns the correct value. @Titaniumtown

otreblan avatar May 12 '20 22:05 otreblan

Oh cool! Thanks for the info!

Titaniumtown avatar May 12 '20 22:05 Titaniumtown

can someone check out my code so far? it works for me.

Titaniumtown avatar May 12 '20 22:05 Titaniumtown

Oh, also I have to add in the color neofetch uses for bedrock.

Titaniumtown avatar May 12 '20 22:05 Titaniumtown

How would I do that?

Titaniumtown avatar May 13 '20 15:05 Titaniumtown

How would I do that?

Change CFLAGS in the Makefile. Edit: I tought this was for the #define

otreblan avatar May 13 '20 16:05 otreblan

what do you mean? I have to add in the colors that neofetch uses for bedrock. That's something to do with printing text, right?

Titaniumtown avatar May 13 '20 17:05 Titaniumtown

https://en.m.wikipedia.org/wiki/ANSI_escape_code

otreblan avatar May 13 '20 19:05 otreblan

I added initial multi-package manager support (just dpkg and pacman atm) and inital coloring of the bedrock logo.

Titaniumtown avatar May 18 '20 21:05 Titaniumtown

I need to figure out how to speed up checking for all the package managers.

Titaniumtown avatar May 18 '20 22:05 Titaniumtown

Right now, my branch is about 10x slower than the master branch. It's all mostly due to package manager recognition.

Titaniumtown avatar May 18 '20 22:05 Titaniumtown

When you enable caching the package info, paleofetch becomes about the same speed as the master branch.

Titaniumtown avatar May 18 '20 23:05 Titaniumtown

One thing I found is that if I have 2 statums (on bedrock linux) of distros that use the same package manager, it only uses one of them to do the count.

Titaniumtown avatar May 18 '20 23:05 Titaniumtown

Caching the package count probably shouldn't be the default behavior. It's a dynamic value that changes pretty often.

allisio avatar May 18 '20 23:05 allisio

Yea, but paleofetch is super slow when you don't. I'm getting about 8-20 ms w/ caching, and 400-600 ms w/o caching.

Titaniumtown avatar May 18 '20 23:05 Titaniumtown