# Stopping your Mac from Going to Sleep

> Historical reference: stopping your Mac from Going to Sleep.

When you leave your Mac alone for a few minutes, it goes to sleep to conserve battery life. When your Mac is asleep, the Internet is disconnected. For those that want to remain connected to IRC at all times, this can be an inconvenience. The Caffeine addon can be installed to instruct your Mac not to sleep while you are connected to IRC.

## Prerequisites

The Caffeine addon is designed to keep your Mac awake while the lid is open. If you want your Mac to stay awake while the lid is closed, then a dedicated solution such as [NoSleep](<https://www.macupdate.com/app/mac/37991/nosleep>) (or other) is required.


## Install Caffeine

Launch the “Textual Extras” installer by entering `/getscripts` into the main input text field.

An installer that is visually similar to the following will appear:

![Stopping your Mac from Going to Sleep: archived screenshot 1](<https://www.textualapp.com/docs-media/4cf8e2f536f565df6035.png>)

2. Click **Continue** to reveal a list of addons that can be installed.

Expand the “Extensions” category and check the checkbox to the left of “Caffeine.”

![Stopping your Mac from Going to Sleep: archived screenshot 2](<https://www.textualapp.com/docs-media/d5b0df0fd33b9950256a.png>)

Continue through with the installation then **restart Textual**.


## Enable Caffeine

Caffeine can be enable by following these steps:

- Open **Preferences** using the keyboard combination [Command Comma](<https://www.textualapp.com/docs/legacy/guides/keyboard-shortcuts>)

- In the window that appears, move focus to the **Addons** section of the navigation bar

- Click the item labeled **Sleep Mode Management** in the menu that appears

- Check the item labeled **Disable sleep while Textual is connected**
