mirror of
https://github.com/eepykate/fet.sh.git
synced 2026-11-25 20:28:17 +00:00
a few visual changes
This commit is contained in:
1 parent
d31ae95231
commit
2a599a2fa0
1 file changed
+19
-14
@@ -54,7 +54,6 @@ mem="${mem%% *}"
|
|||||||
mem="$(( mem / 1000 ))"
|
mem="$(( mem / 1000 ))"
|
||||||
|
|
||||||
## Processor
|
## Processor
|
||||||
# can't really test on AMD. Please make an issue if it doesn't work
|
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
case $line in
|
case $line in
|
||||||
vendor_id*) vendor="${line##*: }";;
|
vendor_id*) vendor="${line##*: }";;
|
||||||
@@ -63,6 +62,7 @@ while read -r line; do
|
|||||||
done < /proc/cpuinfo
|
done < /proc/cpuinfo
|
||||||
vendor="${vendor##*Authentic}"
|
vendor="${vendor##*Authentic}"
|
||||||
vendor="${vendor##*Genuine}"
|
vendor="${vendor##*Genuine}"
|
||||||
|
# This is so messy due to so many inconsistencies in the model names
|
||||||
cpu="${cpu##*) }"
|
cpu="${cpu##*) }"
|
||||||
cpu="${cpu%% @*}"
|
cpu="${cpu%% @*}"
|
||||||
cpu="${cpu%% CPU}"
|
cpu="${cpu%% CPU}"
|
||||||
@@ -85,7 +85,6 @@ case $version in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
## GTK
|
## GTK
|
||||||
# why not..?
|
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
case $line in
|
case $line in
|
||||||
gtk-theme*) gtk="${line##*=}"; break;;
|
gtk-theme*) gtk="${line##*=}"; break;;
|
||||||
@@ -102,17 +101,23 @@ read -r model < /sys/devices/virtual/dmi/id/product_name
|
|||||||
[ $# -gt 0 ] && pkgs=$#
|
[ $# -gt 0 ] && pkgs=$#
|
||||||
|
|
||||||
print() {
|
print() {
|
||||||
printf '\033[34m%6s\033[0m | %s\n' "$1" "$2"
|
[ "$2" ] && printf '\033[34m%6s\033[0m ~ %s\n' "$1" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
[ "$ID" ] && print os "$ID"
|
|
||||||
[ "$SHELL" ] && print sh "${SHELL##*/}"
|
echo
|
||||||
[ "$wm" ] && print wm "$wm"
|
read -r host < /etc/hostname
|
||||||
[ "$d" ] && print up "${d}d $up"
|
printf '%7s@%s\n' "$USER" "$host"
|
||||||
[ "$gtk" ] && print gtk "${gtk# }"
|
|
||||||
[ "$cpu" ] && print cpu "$vendor $cpu"
|
print os "$ID"
|
||||||
[ "$mem" ] && print mem "${mem}MB"
|
print sh "${SHELL##*/}"
|
||||||
[ "$model" ] && print host "$model"
|
print wm "$wm"
|
||||||
[ "$kernel" ] && print kern "$kernel"
|
print up "${d}d $up"
|
||||||
[ "$term" ] && print term "$term"
|
print gtk "${gtk# }"
|
||||||
[ "$pkgs" ] && print "pkgs" "$pkgs"
|
print cpu "$vendor $cpu"
|
||||||
|
print mem "${mem}MB"
|
||||||
|
print host "$model"
|
||||||
|
print kern "$kernel"
|
||||||
|
print pkgs "$pkgs"
|
||||||
|
print term "$term"
|
||||||
|
echo
|
||||||
Reference in new issue
Block a user