Closed eepykate closed 4 years ago
Nice!
relevant: https://youtu.be/PvLz5kCVIss
Thank you!
Thanks
It turns out #40 has code worse than I thought. Among the things I mentioned there, the file isn't even a variable file, it has the contents
Artix Linux release
and nothing more.
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