Skip to content

Instantly share code, notes, and snippets.

@ds17f
Last active August 11, 2021 14:25
Show Gist options
  • Select an option

  • Save ds17f/53109116be526947fc61902fd728a38c to your computer and use it in GitHub Desktop.

Select an option

Save ds17f/53109116be526947fc61902fd728a38c to your computer and use it in GitHub Desktop.
A script for setting the screensaver/sleep timeout on a firetv stck
# Use this to set the screensaver on a firetv
# you can't set it as executable (unless you're rooted)
# so you need to run it as:
# $ source ./sleep_settings.sh
echo "Enter screensaver timeout in minutes (Default 5)"
read SCREENSAVER_ON_IN_MINUTES
echo "Enter screen off timeout in minutes (Default 20)"
read SLEEP_IN_MINUTES
SCREENSAVER_IN_MILLISECONDS=`expr "$SCREENSAVER_ON_IN_MINUTES" \* 60000`
SLEEP_IN_MILLISECONDS=`expr "$SLEEP_IN_MINUTES" \* 60000`
set -x
settings put system screen_off_timeout $SCREENSAVER_IN_MILLISECONDS
settings put secure sleep_timeout $SLEEP_IN_MILLISECONDS
set +x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment