Random One-Liners

pmset -g assertions|grep -q '^ *UserIsActive *1$' && echo "User active" || echo "user inactive"
Tags: