]> git.armaanb.net Git - bin.git/commitdiff
make ufetch more versatile
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Thu, 26 Nov 2020 01:21:40 +0000 (20:21 -0500)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Thu, 26 Nov 2020 01:21:40 +0000 (20:21 -0500)
  * Replace 'hostname' command
  * Un-hardcode OS name

ufetch

diff --git a/ufetch b/ufetch
index 7e961eb479b5265ed1e792ea163f6525adf03646..30f25f97ee31da576ab7a2bddf976ebdec3300ec 100755 (executable)
--- a/ufetch
+++ b/ufetch
@@ -2,8 +2,8 @@
 # ufetch-armaan. My customized version of ufetch that doesn't print the ascii art, and doesn't spend time looking things up like the DE. Full credit goes to jschx (Joe Schillinger), the author of ufetch. <https://gitlab.com/jschx/ufetch>
 
 ## INFO
-host="$(hostname)"
-os='Debian unstable'
+host="$(cat /etc/hostname | head -n 1)"
+os="$(cat /etc/os-release | head -n 1 | cut -d '"' -f 2)"
 kernel="$(uname -sr)"
 uptime="$(uptime -p | cut -d ',' -f 1-2 | tail -c +4)"
 shell="zsh"