Merge pull request #20 from xquiet/master

fixed uptime detection on FreeBSD and added a brief howto for Mageia to README
This commit is contained in:
Brett Bohnenkamper
2012-10-31 22:10:04 -07:00
2 changed files with 10 additions and 1 deletions

View File

@@ -18,6 +18,11 @@ How do I get screenFetch? (Arch Linux)
1. Install `screenfetch-git` or 'screenfetch' from the AUR. That's it!
How do I get screenFetch? (Mageia)
---------------------
1. Install screenfetch from the official repositories with urpmi or rpmdrake.
e.g. # urpmi screenfetch
How do I get screenFetch? (Others)
---------------------

View File

@@ -441,6 +441,8 @@ detectuptime () {
boot=`sysctl -n kern.boottime | cut -d "=" -f 2 | cut -d "," -f 1`
now=`date +%s`
uptime=$(($now-$boot))
elif [ "$distro" == "FreeBSD" ]; then
uptime=`sysctl -n kern.boottime | awk -F' ' '{print $4}' | tr -d ","`
else
uptime=`awk -F. '{print $1}' /proc/uptime`
fi
@@ -864,6 +866,8 @@ detectgtk () {
lxdeconf="/lxde/config"
elif [ $distro == "Trisquel" ]; then
lxdeconf=""
elif [ "$distro" == "FreeBSD" ]; then
lxdeconf=""
else
lxdeconf="/lxsession/LXDE/desktop.conf"
fi
@@ -2079,4 +2083,4 @@ infoDisplay
[ "$screenshot" == "1" ] && takeShot
[ "$exportTheme" == "1" ] && themeExport
exit 0
exit 0