Lxtharia / minegrub-theme

A Grub Theme in the style of Minecraft!
MIT License
3.22k stars 41 forks source link

Add package updater to generate script using neofetch #19

Closed duhby closed 1 year ago

duhby commented 1 year ago

Basically just the title, requires neofetch to be installed.

I only recently had the idea to use neofetch so it wouldn't be specific to arch systems which is why I didn't include it in the previous pull request 😅

Note: it uses specific line numbers to update the numbers in theme.txt, so if that file gets updated this one might need to be as well.

Oh also I added some more splashes I thought of haha

Lxtharia commented 1 year ago

Nice! This was also a plan of mine when i first designed it, but i was always too afraid to automatically change the theme.txt (and i'm unmotivated hoh)

I can't judge the splash texts, but i'd make a suggestion issue thread for these actually.

Also, changing a very specific is not a good idea. Either there should be a # PACKAGELABEL comment above/in that line and find/replace it using regex. It's probably also possible to use regex to find the line on its own, but if it accidentally gets replaced, then regex might fail the next time. Maybe using a zero-width character, but that all feels like not super safe solutions

Maybe generate.py should be renamed to something like update_splash_and_packag_count.py, cause it now does two things!

But thank you, that feature would improve the theme to an even bigger extend than all the others out there (i think)!

duhby commented 1 year ago

I think having a comment above the lines that should get replaced is a good idea, I'll try that.

For the name of the file it could probably be called "update_theme.py" to be more descriptive. It'd also be more inline with the systemd service name "minegrub-update".

duhby commented 1 year ago

Alright, it's basically impossible to break with this new version, I've tested it with adding new lines, running it multiple times, etc. It's somewhat based off of the way file update tools written in python do similar tasks. Let me know if there's anything you want changed.

Lxtharia commented 1 year ago

Very nice! It would break if packages installed would be changed to lowercase or with more spaces in between, but why would that happen, so the way it's now is perfect.