Skip to content

Instantly share code, notes, and snippets.

@0x07dc
Last active October 8, 2020 05:51
Show Gist options
  • Save 0x07dc/f77e5573e11c6384813c299bf99c90da to your computer and use it in GitHub Desktop.
Save 0x07dc/f77e5573e11c6384813c299bf99c90da to your computer and use it in GitHub Desktop.
Batch file to simplify running windowsSleepTimer.py
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
:: windowsSleepTimer.py is in a folder called deps in this implementation
:: this folder is in the same folder as windowsSleepTimer.py
::
:: Usage:
:: To control time until audio silence:
:: > sleepTimer.bat <minutesUntilSilence>
:: To use the default setting:
:: > sleepTimer.bat
:: Example:
:: > sleepTimer.bat 60
:: > sleepTimer.bat
::
:: You can put this file in your System Environment to make it convenient.
:: Then, at any time, run:
:: > sleepTimer 60
:: to silence the audio in 60 minutes
::
:: Currently the default if you don't set it is 140 minutes
:: Then, you can just run:
:: > sleepTimer
::
:: πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„πŸŒ„
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
if %~1=="" (python %~dp0deps\windowsSleepTimer.py 140
) else (python %~dp0deps\windowsSleepTimer.py %~1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment