Skip to content

Instantly share code, notes, and snippets.

View kimsyversen's full-sized avatar

Kim Syversen kimsyversen

View GitHub Profile
@kimsyversen
kimsyversen / idletime.sh
Created October 1, 2015 19:20 — forked from Neil-Smithline/idletime.sh
Mac OS X Idle Time Shell Script
#!/bin/sh
# Get MacOSX idletime. Shamelessly stolen from http://bit.ly/yVhc5H
/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/awk '/HIDIdleTime/ {print int($NF/1000000000); exit}'