https://github.com/pkage/caffeine
A fairly lightweight daemon that keeps your computer awake. Designed for rootless environments.
https://github.com/pkage/caffeine
caffeinate linux xorg
Last synced: 2 months ago
JSON representation
A fairly lightweight daemon that keeps your computer awake. Designed for rootless environments.
- Host: GitHub
- URL: https://github.com/pkage/caffeine
- Owner: pkage
- License: mit
- Created: 2019-05-03T04:44:05.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-03T05:23:10.000Z (about 7 years ago)
- Last Synced: 2025-09-15T03:57:14.803Z (9 months ago)
- Topics: caffeinate, linux, xorg
- Language: C
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Caffeine daemon
This is a really simple [caffeine](https://en.wikipedia.org/wiki/Caffeine) daemon for your linux system.
This works entirely without requiring root access and bypasses any imposed system management by emulating a mouse wiggle every few minutes.
## Get started
Build the daemon & controller:
```
$ make install
```
This produces a `caffeine` artifact in the directory, and creates a folder in your `~/.config/` directory. You can then copy this onto your `$PATH`.
N.B. this requires `xdotool` at the moment.
## Usage
Command | Effect
--- | ---
`caffeine daemon` | Start the caffeine daemon. Creates a lockfile in the caffeine config dir.
`caffeine status` | Check if the daemon is running, and if it is, check if it is keeping the screen awake.
`caffeine query` | Same as status, but returns an exit code instead of printing (for embedding).
`caffeine start` | Start keeping the screen awake.
`caffeine stop` | Stop keeping the screen awake.
`caffeine toggle` | Toggle keeping the screen awake.
`caffeine diagnostic` | Show some diagnostic information (daemon status, etc.)
`caffeine version` | Show version.
## Configuration
Check out the `config.h` file for configuration options.