Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions screenfetch-dev
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,8 @@ detecthost () {
detectkernel () {
if [[ "$distro" == "OpenBSD" ]]; then
kernel=$(uname -a | cut -f 3- -d ' ')
elif [[ "$distro" == "FreeBSD" ]]; then
kernel=$(freebsd-version -r)
else
# compatibility for older versions of OS X:
kernel=$(uname -m && uname -sr)
Expand Down Expand Up @@ -1484,7 +1486,7 @@ detectpkgs () {
pkgs=$(pkg_info | grep -c .)
;;
'FreeBSD')
pkgs=$(pkg info | grep -c .)
pkgs=$(/usr/sbin/pkg info | grep -c .)
;;
'Cygwin')
offset=2
Expand Down Expand Up @@ -1547,10 +1549,8 @@ detectcpu () {
else
cpu="Unknown"
fi
elif [ "$distro" == "FreeBSD" ]; then
cpu=$(dmesg | "${AWK}" -F': ' '/^CPU/ {gsub(/ +/," "); gsub(/\([^\(\)]*\)|CPU /,"", $2); print $2; exit}')
elif [ "$distro" == "DragonFlyBSD" ]; then
cpu=$(sysctl -n hw.model)
elif [[ "$distro" == "FreeBSD" || "$distro" == "DragonFlyBSD" ]]; then
cpu=$(sysctl -n hw.model)
elif [ "$distro" == "OpenBSD" ]; then
cpu=$(sysctl -n hw.model | sed 's/@.*//')
elif [ "$distro" == "Haiku" ]; then
Expand Down Expand Up @@ -6427,7 +6427,11 @@ infoDisplay () {
((display_index++))
fi
if [[ "${display[@]}" =~ "kernel" ]]; then
mykernel=$(echo -e "$labelcolor Kernel:$textcolor $kernel")
if [[ "$distro" == "FreeBSD" ]]; then
mykernel=$(echo -e "$labelcolor Running Kernel:$textcolor $kernel")
else
mykernel=$(echo -e "$labelcolor Kernel:$textcolor $kernel")
fi
out_array=( "${out_array[@]}" "$mykernel" )
((display_index++))
fi
Expand Down