#display #settings #cli-tool #cli

bin+lib displayz

使用 Rust 编写的控制 Windows 显示设置的 CLI 工具和库

1 个不稳定版本

0.1.0 2022 年 6 月 9 日

#731配置

Download history · Rust 包仓库 223/week @ 2024-03-13 · Rust 包仓库 345/week @ 2024-03-20 · Rust 包仓库 144/week @ 2024-03-27 · Rust 包仓库 267/week @ 2024-04-03 · Rust 包仓库 184/week @ 2024-04-10 · Rust 包仓库 161/week @ 2024-04-17 · Rust 包仓库 119/week @ 2024-04-24 · Rust 包仓库 194/week @ 2024-05-01 · Rust 包仓库 168/week @ 2024-05-08 · Rust 包仓库 108/week @ 2024-05-15 · Rust 包仓库 180/week @ 2024-05-22 · Rust 包仓库 205/week @ 2024-05-29 · Rust 包仓库 300/week @ 2024-06-05 · Rust 包仓库 151/week @ 2024-06-12 · Rust 包仓库 181/week @ 2024-06-19 · Rust 包仓库 213/week @ 2024-06-26 · Rust 包仓库

892 每月下载量

MIT 许可证

29KB
653

displayz

MIT License Continuous integration Crates.io Chocolatey

使用 Rust 编写的控制 Windows 显示设置的 CLI 工具和库。

安装

Chocolatey

在 Windows 上使用 Chocolatey 安装 displayz

choco install displayz

Cargo

在 Windows 上使用 Cargo 安装 displayz

cargo install displayz

用法

命令行

安装后,将可以使用 displayz 命令。

使用以下命令获取帮助

displayz --help

以下子命令可用

  • set-primary --id <id>:将指定 ID 的显示设置为默认显示。
  • primary <properties>:设置默认显示的属性。
  • properties --id <id> <properties>:为指定 ID 设置显示属性。

<properties> 参数可以是以下多个(但至少一个,每种最多一个)之一:

  • --position <x>,<y>:设置显示的位置。
  • --resolution <width>x<height>:设置显示的分辨率。
  • --orientation <orientation>:设置显示的方向。
    • 方向可以是 DefaultUpsideDownRightLeft
  • --fixedoutput <固定输出 模式>:设置显示的固定输出模式。
    • 模式可以是以下之一:默认拉伸居中

Rust 库

请参阅 examples/ 文件夹中的示例,了解如何使用该库。

依赖项

~10–21MB
~286K SLoC