3 个版本

0.1.2 2024年4月22日
0.1.1 2024年2月2日
0.1.0 2024年2月2日

#1606命令行工具

Download history 39/week @ 2024-04-16 56/week @ 2024-04-23 1/week @ 2024-05-21

每月下载量 177

MIT 许可证

27KB
402 代码行

keep-active

Crates.io CI Release

Fork 自 keepawake-rs,旨在添加保持状态跟踪器(如 Skype、MS Teams 等)活跃的功能。

保持电脑唤醒(并活跃!)类似于 caffeinatesystemd-inhibit/gnome-session-inhibitPowerToys Awake,但跨平台且用 Rust 编写。

用法

Keep your computer awake and active

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

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

Options:
  -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

请参阅 docs.rs/keep-active 以获取库crate文档和用法。

安装

Cargo

cargo install keep-active -F bin

二进制文件

https://github.com/omerbustun/keep-active/releases/latest 下载。

自动完成

使用: keep-active --completions <SHELL> 生成自动完成脚本,您需要将其安装为适用于您正在使用的特定shell。

注意

防止电脑明确休眠,以及/或通过关闭盖子,通常受到 OS 的各种限制,例如:仅在 AC 电源下,不在任何运行 Windows 的 PC 上(带有 现代待机)。此外,请注意,现代待机会忽略/终止 DC(电池)电源上的电源请求,PowerSetRequest - 备注

许可证

MIT 许可证。

依赖关系

~2–49MB
~746K SLoC