aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2016-10-24 20:04:36 +0300
committerFilipp Lepalaan <filipp@mac.com>2016-10-24 20:04:36 +0300
commit9443fcdd32abe4570e9ac427d859834a5d8be3a8 (patch)
treebfbbfb310d7c41a78fbc4212ea358dc2e91c9317
parentb8e5b6d00b40cfe94efd0bb4fce7a74b971abb0f (diff)
downloadmachammer-9443fcdd32abe4570e9ac427d859834a5d8be3a8.tar.gz
machammer-9443fcdd32abe4570e9ac427d859834a5d8be3a8.tar.bz2
machammer-9443fcdd32abe4570e9ac427d859834a5d8be3a8.zip
Added sleep()
-rw-r--r--machammer/functions.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/machammer/functions.py b/machammer/functions.py
index 0a7b853..728f55a 100644
--- a/machammer/functions.py
+++ b/machammer/functions.py
@@ -173,6 +173,11 @@ def enable_ard(username):
'-restart', '-agent'])
+def sleep():
+ """Put this Mac to sleep"""
+ tell_app('Finder', 'sleep')
+
+
def is_laptop():
profile = SystemProfile('Hardware')
return 'Book' in profile.machine_model