3 个版本
0.1.2 | 2024年4月22日 |
---|---|
0.1.1 | 2024年2月2日 |
0.1.0 | 2024年2月2日 |
#1606 在 命令行工具
每月下载量 177
27KB
402 代码行
keep-active
Fork 自 keepawake-rs,旨在添加保持状态跟踪器(如 Skype、MS Teams 等)活跃的功能。
保持电脑唤醒(并活跃!)类似于 caffeinate
,systemd-inhibit
/gnome-session-inhibit
或 PowerToys 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