-
-
Save mals14/ce3935c7183ac468d3431bc5b3adc69d 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