The goal for this is to make me write better readable code and to also make me a better reviewer
- Does the brnach name, PR name makes sense?
| # This prevents a macos/osx computer even when the lid is closed to prevent it going to sleep in a multi desktop set-up | |
| # based off https://apple.stackexchange.com/users/9058/nohillside 's answer at https://apple.stackexchange.com/questions/219885/use-caffeinate-to-prevent-sleep-on-lid-close-on-battery | |
| # store in /user/local/bin | |
| #! /bin/bash | |
| BATTERY_SLEEP=5 # in minutes | |
| DEF_WAKE_LEN=32400 # in seconds - I'm on my computer for 9 hours usually | |
| #***** determine timeout value ***** | |
| timeout_len=${DEF_WAKE_LEN:-32400} # see also https://unix.stackexchange.com/questions/122845/using-a-b-for-variable-assignment-in-scripts |