Close your MacBook lid and keep it running, on battery, without an external display. Wi-Fi stays connected.
curl -fsSL https://raw.githubusercontent.com/yonnock/lidon/main/install.sh | shWorks with fish, bash and zsh.
lidon # Mac stays awake when the lid is closed
lidoff # back to normal sleepCheck the state with pmset -g | grep SleepDisabled (1 = stays awake).
- Uses
sudo pmset -a disablesleep, so you'll be asked for your password. - The setting stays active until you run
lidoffor reboot. - Don't put the closed Mac in a bag while
lidonis active. It can get hot.
lidoff
rm -f ~/.lidon.sh ~/.config/fish/functions/lidon.fish ~/.config/fish/functions/lidoff.fishThen remove the .lidon.sh line from ~/.bashrc, ~/.bash_profile or ~/.zshrc.
MIT