Last active
August 11, 2021 14:25
-
-
Save ds17f/53109116be526947fc61902fd728a38c to your computer and use it in GitHub Desktop.
A script for setting the screensaver/sleep timeout on a firetv stck
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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