#!/usr/bin/env bash
set -euo pipefail

# Script Name: sleepybear
# Description: Put system to sleep
# Source: https://evanhahn.com/scripts-i-wrote-that-i-use-all-the-time/
# Usage: sleepybear

if [[ "$(uname)" == 'Darwin' ]]; then
  exec /usr/bin/osascript -e 'tell application "System Events" to sleep'
else
  systemctl suspend
fi
