4 个版本
0.1.3 | 2020年2月16日 |
---|---|
0.1.2 | 2020年2月16日 |
0.1.1 | 2020年2月16日 |
0.1.0 | 2020年2月16日 |
#2640 in 命令行工具
7KB
63 代码行
Luster
Luster 是一款用于在 Windows 计算机上打印或设置屏幕亮度的命令行工具。
在 Windows 的命令行中设置亮度的过程需要几个步骤来确定涉及的 GUID。这个程序简单地使用 'powercfg' 来查询电源状态,找到相关的 GUID,然后使用 'powercfg' 将亮度设置为所需值。
用法
使用 luster 有两种方式 - 获取亮度(不提供任何参数)和设置亮度(提供一个最大亮度的百分比)。
请注意,打印输出使用 Windows 术语,AC 指的是墙上的电源,DC 指的是电池电源。此程序两者都设置,没有选项可以单独设置。
luster 0.1.2
Set screen brightness in Windows.
With no arguments luster will print the current AC (wall power) brightness
and the DC (battery) brightness
USAGE:
luster.exe [percent]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<percent> Brightness setting
例如
luster 80
将亮度设置为 80% 并
luster
将打印
AS 80
DC 80
测试
这个工具是为了使在 Windows 10 笔记本电脑上设置亮度更加容易而编写的,并且仅在那一台电脑上进行了测试。它提供出来,希望对其他人也有用。代码假设了 'powercfg /q' 输出的某些内容和格式。
许可证
此代码受 MIT 或 APACHE 2 许可证中的任何一个许可,您喜欢哪个就用哪个。
依赖关系
~3MB
~51K SLoC