Prevent your Mac from sleeping when using VS Code remotely.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
eta 1a0e284902 fix shocking failure of engineering 4 weeks ago
.vscode initial commit: do the thing, maybe 4 weeks ago
src fix shocking failure of engineering 4 weeks ago
.gitignore initial commit: do the thing, maybe 4 weeks ago
.vscodeignore initial commit: do the thing, maybe 4 weeks ago
.yarnrc initial commit: do the thing, maybe 4 weeks ago
LICENSE initial commit: do the thing, maybe 4 weeks ago
README.md update README 4 weeks ago
package.json add repository line 4 weeks ago
tsconfig.json initial commit: do the thing, maybe 4 weeks ago
yarn.lock initial commit: do the thing, maybe 4 weeks ago

README.md

macos-remote-caffeinate

Prevent your Mac from sleeping when using VS Code remotely.

This incredibly simple, basically one-line extension does one thing and one thing only: runs caffeinate with the Process ID of (what we hope is) the VS Code extension host process. This prevents a Mac from sleeping until the extension host process exits.

Why would you want this? Well, if you're running something like code-server to access VS Code on your Mac remotely, you might find the Mac goes to sleep while you're connected in. This is because there's nothing to tell it to stay awake (the only reason this doesn't happen when you SSH in remotely, for example, is because the OS is checking for remote ttys).

This incredibly dumb extension fixes this problem. (At least for me.)

Installing

$ npx @vscode/vsce package

Then, install /macos-remote-caffeinate-0.0.1.vsix via Extensions > triple-dot menu > Install from VSIX....

LICENSE

MIT (there's really nothing here)