3 releases

0.1.2 Apr 22, 2024
0.1.1 Feb 2, 2024
0.1.0 Feb 2, 2024

#1590 in Command line utilities

Download history 30/week @ 2024-03-31 91/week @ 2024-04-21 4/week @ 2024-04-28 1/week @ 2024-05-19

177 downloads per month

MIT license

402 lines


Crates.io CI Release

Fork of keepawake-rs with the intention of adding the ability to keep status trackers (e.g. Skype, MS Teams etc.) active.

Keep your computer awake (and active!). Like caffeinate, systemd-inhibit/gnome-session-inhibit, or PowerToys Awake, but cross-platform and written in Rust.


Keep your computer awake and active

Usage: keep-active [OPTIONS] [COMMAND]...

  [COMMAND]...  Run the command and wait for it to exit, keeping the computer awake while it runs

  -d, --display              Keep display on
  -i, --idle                 Keep system from idle sleeping
  -s, --sleep                Keep system from sleeping (Functionality and conditions for this to work vary by OS)
  -a, --status_active        Keep status trackers active (e.g. Skype, MS Teams etc.)
      --completions <SHELL>  Generate shell completions [possible values: bash, elvish, fish, powershell, zsh]
  -w <PID>                   Wait for the process with the specified pid to exit. This option is ignored when used with the COMMAND argument
  -h, --help                 Print help information
  -V, --version              Print version information

See docs.rs/keep-active for library crate documentation and usage.



cargo install keep-active -F bin


Download from https://github.com/omerbustun/keep-active/releases/latest.


Use: keep-active --completions <SHELL> to generate a completion script, you will have to install it as appropriate for the specific shell you are using.


Preventing the computer from explicitly sleeping, and/or by closing the lid, is often restricted in various ways by the OS, e.g. Only on AC power, not in any PC running Windows with Modern Standby. Also note that Modern Standby ignores/terminates power requests on DC (Battery) power, PowerSetRequest - Remarks.


MIT License.


~744K SLoC