{"action":"created","issue":{"url":"https://api.github.com/repos/dylanaraps/fetch.sh/issues/7","labels_url":"https://api.github.com/repos/dylanaraps/fetch.sh/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/dylanaraps/fetch.sh/issues/7/comments","events_url":"https://api.github.com/repos/dylanaraps/fetch.sh/issues/7/events","html_url":"https://github.com/dylanaraps/fetch.sh/issues/7","id":124521726,"number":7,"title":"Script does not show information on OS X","user":{"login":"jrgz","id":12901172,"avatar_url":"https://avatars.githubusercontent.com/u/12901172?v=3","gravatar_id":"","url":"https://api.github.com/users/jrgz","html_url":"https://github.com/jrgz","followers_url":"https://api.github.com/users/jrgz/followers","following_url":"https://api.github.com/users/jrgz/following{/other_user}","gists_url":"https://api.github.com/users/jrgz/gists{/gist_id}","starred_url":"https://api.github.com/users/jrgz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrgz/subscriptions","organizations_url":"https://api.github.com/users/jrgz/orgs","repos_url":"https://api.github.com/users/jrgz/repos","events_url":"https://api.github.com/users/jrgz/events{/privacy}","received_events_url":"https://api.github.com/users/jrgz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":60,"created_at":"2016-01-01T00:29:30Z","updated_at":"2016-01-04T04:18:51Z","closed_at":null,"body":"When I run the script, everything is properly formatted, but no information is printed for most items. \r\n\r\nMissing:\r\n- OS information\r\n- Uptime\r\n- Packages\r\n- Window Manager\r\n- CPU\r\n- Memory\r\n- Song (I assume because of the mpc dependency)\r\n- Image (also probably because of missing dependencies)\r\n\r\nColor blocks print successfully.\r\n\r\nHere's a picture:\r\nhttp://imgur.com/2i9zujy\r\n\r\nTerminal is iTerm2 (script runs the same on the default Terminal app) and I'm running OS X 10.11.2\r\n"},"comment":{"url":"https://api.github.com/repos/dylanaraps/fetch.sh/issues/comments/168577149","html_url":"https://github.com/dylanaraps/fetch.sh/issues/7#issuecomment-168577149","issue_url":"https://api.github.com/repos/dylanaraps/fetch.sh/issues/7","id":168577149,"user":{"login":"dylanaraps","id":6799467,"avatar_url":"https://avatars.githubusercontent.com/u/6799467?v=3","gravatar_id":"","url":"https://api.github.com/users/dylanaraps","html_url":"https://github.com/dylanaraps","followers_url":"https://api.github.com/users/dylanaraps/followers","following_url":"https://api.github.com/users/dylanaraps/following{/other_user}","gists_url":"https://api.github.com/users/dylanaraps/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanaraps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanaraps/subscriptions","organizations_url":"https://api.github.com/users/dylanaraps/orgs","repos_url":"https://api.github.com/users/dylanaraps/repos","events_url":"https://api.github.com/users/dylanaraps/events{/privacy}","received_events_url":"https://api.github.com/users/dylanaraps/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T04:18:51Z","updated_at":"2016-01-04T04:18:51Z","body":"How about this? Turns out screenfetch does some math on the variable later on.\r\n\r\n```sh\r\nboot=$(sysctl -n kern.boottime | cut -d \"=\" -f 2 | cut -d \",\" -f 1)\r\nnow=$(date +%s)\r\nuptime=$(($now-$boot))\r\n\r\nsecs=$((${uptime}%60))\r\nmins=$((${uptime}/60%60))\r\nhours=$((${uptime}/3600%24))\r\ndays=$((${uptime}/86400))\r\nuptime=\"${mins}m\"\r\n\r\nif [ \"${hours}\" -ne \"0\" ]; then\r\n    uptime=\"${hours}h ${uptime}\"\r\nfi\r\nif [ \"${days}\" -ne \"0\" ]; then\r\n    uptime=\"${days}d ${uptime}\"\r\nfi\r\n\r\necho \"$uptime\"\r\n```"}}