diff --git a/neofetch b/neofetch index 9cf0d249..85c003d6 100755 --- a/neofetch +++ b/neofetch @@ -1216,8 +1216,14 @@ get_uptime() { # Get uptime in seconds. case "$os" in "Linux" | "Windows" | "MINIX") - seconds="$(< /proc/uptime)" - seconds="${seconds/.*}" + if [[ -r /proc/uptime ]]; then + seconds="$(< /proc/uptime)" + seconds="${seconds/.*}" + else + boot="$(date -d"$(uptime -s)" +%s)" + now="$(date +%s)" + seconds="$((now - boot))" + fi ;; "Mac OS X" | "iPhone OS" | "BSD" | "FreeMiNT")