Skip to content
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

Memory is shown in fetch if it's 0 #30

Closed
elkowar opened this issue Mar 26, 2021 · 0 comments · Fixed by #32
Closed

Memory is shown in fetch if it's 0 #30

elkowar opened this issue Mar 26, 2021 · 0 comments · Fixed by #32

Comments

@elkowar
Copy link
Contributor

elkowar commented Mar 26, 2021

With fetches that where taken over from the migration, Memory: 0 is the value that users get when they didn't provide memory. This should still not be shown in the fetch.

mlvzk referenced this issue in mlvzk/trup-rs Apr 15, 2021
elkowar pushed a commit that referenced this issue Apr 16, 2021
* init fetcher.sh

* inform user that they can attach an image

* minor changes

* add macOS support to fetcher.sh

* remove unneeded math for ram and fix macos logo

* spaces -> tabs

* add macOS version

* ver

* readability changes, slightly more efficient

* better term detection for macos

* adding proper terminal recognition (#27)

* Adding recognition for xst (#28)

* Adding gpu detection to fetcher.sh (#35)

closes #30

* Artix support, use more builtins, clearer print message

Clarify that !setfetch without update deletes the image and fields that
were set previously

Instead of trying to directly read /etc/os-release which will exit the
whole script on distros (using a POSIX shell) that don't have it,
abuse a for loop to go through /etc/os-release, /etc/lsb-release,
then /etc/artix-release, then save and stop the loop if that file is found

Instead of using 2 awk commands to get the GTK theme / icon theme, use
a single 'while read' loop then check for both at once using case.

Check for the variables "XDG_CURRENT_DESKTOP" and "DESKTOP_SESSION"
before using 'xprop' / 'ps' to detect the WM manually, make 'ps' check
for some wayland compositors ('sway', 'kiwmi' and 'wayfire') due to
there being no reason not to

use a 'while read' loop instead of awk on /proc/cpuinfo

use 'read' on /proc/meminfo to get the first line instead of awk

Abuse sh variable substitutions on 'lspci | grep' instead of using
sed, grep, and tr, still very ugly, but a better solution IMO

Don't check for the existence of $EDITOR, you can do
variable substitution on unset variables without breaking anything

use 'defaults read' to get MacOS version instead of awk then variable
substitution

* remove broken artix "support"

I had received incorrect information about the contents of the file from
someone who doesn't know scripting and didn't test, so it didn't work anyway

* Cleaner code, detect WM correctly (#86)

* Cleaner code

Less relying on other parts of the script (no space in term, falling
back to $DISTRIB_ID)
Set $NAME to $DISTRIB_ID instead of the messy solution where it falls
back to $DISTRIB_ID if $NAME doesn't exist

Checking existence of $DESKTOP_SESSION and $XDG_CURRENT_DESKTOP isn't
needed, just set the vars.

read supports variable/word splitting, no need to read into one variable
then manually split args

**FEATURE ADD**
no longer prints error about lspci not being found due to faulty
checking (lol wonder who did this they must be stoopid)

Remove file path from $EDITOR when printing instad of duplicating code
for macos and linux

Detect more terms in few lines due to abusing regex
Remove leading space, like mentioned earlier (Without this it would have
printed with no space on macos, as I said, weird depends on other parts)

* NEW FEATURE:: Detect WM correctly

* Fix order of checking for DE vars

* capitalize display protocol

* Add resolution support

* Add bar support

* Fix inconsistent order of fields

* detect gtk stuff correctly in gnome

* fetcher.sh style fixes

* change indention in fetcher.sh

* add gnome-terminal

ikr

* Wording adjustments to make !setfetch more clear

* Fix minor typos

* add support for detecting bedrock linux to fetcher

currently when running this on bedrock setup it detects stratum (distro integrated in bedrock linux) in which it currently runs
i changed it, so it will use /bedrock/etc/os-release instead of /etc/os-realease in case if its ran in bedrock linux
this change shouldnt affect other linux as they propably dont have /bedrock/etc/os-release file

* remove everything before the first colon for XDG_CURRENT_DESKTOP

* Support shells in fetch

* change fetcher.sh link to point to trup-rs repo

Co-authored-by: Arul Agrawal <me@arul.io>
Co-authored-by: Gauge Krahe <gaugekrahe@gmail.com>
Co-authored-by: exorcist <51526053+exorcist-gif@users.noreply.github.com>
Co-authored-by: 40295114+6gk@users.noreply.github.com <40295114+6gk@users.noreply.github.com>
Co-authored-by: Safin Singh <42120904+safinsingh@users.noreply.github.com>
Co-authored-by: safinsingh <safin.singh@gmail.com>
Co-authored-by: Quinten <58103738+HexaOneOfficial@users.noreply.github.com>
Co-authored-by: Pan Pernicek <61617356+Pan00Pernicek@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant