-
-
Save kimsyversen/11674585e631290f27a3 to your computer and use it in GitHub Desktop.
Mac OS X Idle Time Shell Script
This file contains 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