-
-
Save Dulani/f4b7182571e975989b107be4f2f9bb08 to your computer and use it in GitHub Desktop.
Mac OS X Idle Time Shell Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment