From 9443fcdd32abe4570e9ac427d859834a5d8be3a8 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 24 Oct 2016 20:04:36 +0300 Subject: Added sleep() --- machammer/functions.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3