Skip to content

Commit

Permalink
sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
markroxor committed Aug 2, 2018
1 parent 7f86acb commit 6e2a757
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ def take_action(data):

if len(keystroke.split(' ')) > 1:
pyautogui.hotkey(*keystroke.split(' '))
elif keystroke == 'sleep' or keystroke == 'suspend':
pyautogui.hotkey("alt", "f2")
time.sleep(1)
pyautogui.typewrite("systemctl suspend")
pyautogui.press("enter")
else:
if keystroke in key_map:
keystroke = key_map[keystroke]
Expand Down

0 comments on commit 6e2a757

Please sign in to comment.