diff --git a/pfetch b/pfetch index 401be56..18faecd 100755 --- a/pfetch +++ b/pfetch @@ -118,6 +118,16 @@ get_kernel() { log kernel "$kernel_version" } +get_host() { + case $kernel_name in + Linux*|GNU*) + read -r model < /sys/devices/virtual/dmi/id/product_version + ;; + esac + + log host "$model" +} + get_uptime() { # Uptime works by retrieving the data in total seconds and then # converting that data into days, hours and minutes using simple @@ -141,6 +151,16 @@ get_uptime() { log uptime "${uptime:-0m}" } +get_packages() { + case $kernel_name in + Linux*|GNU*) + command -v kiss && packages=$(kiss l | wc -l) + ;; + esac >/dev/null + + log pkgs "$packages" +} + get_memory() { case $kernel_name in # Used memory is calculated using the following "formula" (Linux): @@ -230,8 +250,10 @@ EOF get_ascii get_title get_distro + get_host get_kernel get_uptime + get_packages get_memory # Position the cursor below both the ascii art and information lines.