├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── src ├── args.rs ├── enums.rs ├── funcs │ └── mod.rs ├── main.rs └── setup │ └── mod.rs └── tests └── cli.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "anstream" 16 | version = "0.3.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" 19 | dependencies = [ 20 | "anstyle", 21 | "anstyle-parse", 22 | "anstyle-query", 23 | "anstyle-wincon", 24 | "colorchoice", 25 | "is-terminal", 26 | "utf8parse", 27 | ] 28 | 29 | [[package]] 30 | name = "anstyle" 31 | version = "1.0.1" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" 34 | 35 | [[package]] 36 | name = "anstyle-parse" 37 | version = "0.2.1" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" 40 | dependencies = [ 41 | "utf8parse", 42 | ] 43 | 44 | [[package]] 45 | name = "anstyle-query" 46 | version = "1.0.0" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" 49 | dependencies = [ 50 | "windows-sys", 51 | ] 52 | 53 | [[package]] 54 | name = "anstyle-wincon" 55 | version = "1.0.1" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" 58 | dependencies = [ 59 | "anstyle", 60 | "windows-sys", 61 | ] 62 | 63 | [[package]] 64 | name = "assert_cmd" 65 | version = "2.0.12" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" 68 | dependencies = [ 69 | "anstyle", 70 | "bstr", 71 | "doc-comment", 72 | "predicates", 73 | "predicates-core", 74 | "predicates-tree", 75 | "wait-timeout", 76 | ] 77 | 78 | [[package]] 79 | name = "async-broadcast" 80 | version = "0.5.1" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" 83 | dependencies = [ 84 | "event-listener", 85 | "futures-core", 86 | ] 87 | 88 | [[package]] 89 | name = "async-channel" 90 | version = "1.9.0" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" 93 | dependencies = [ 94 | "concurrent-queue", 95 | "event-listener", 96 | "futures-core", 97 | ] 98 | 99 | [[package]] 100 | name = "async-executor" 101 | version = "1.5.1" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" 104 | dependencies = [ 105 | "async-lock", 106 | "async-task", 107 | "concurrent-queue", 108 | "fastrand 1.9.0", 109 | "futures-lite", 110 | "slab", 111 | ] 112 | 113 | [[package]] 114 | name = "async-fs" 115 | version = "1.6.0" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" 118 | dependencies = [ 119 | "async-lock", 120 | "autocfg", 121 | "blocking", 122 | "futures-lite", 123 | ] 124 | 125 | [[package]] 126 | name = "async-io" 127 | version = "1.13.0" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" 130 | dependencies = [ 131 | "async-lock", 132 | "autocfg", 133 | "cfg-if", 134 | "concurrent-queue", 135 | "futures-lite", 136 | "log", 137 | "parking", 138 | "polling", 139 | "rustix 0.37.23", 140 | "slab", 141 | "socket2", 142 | "waker-fn", 143 | ] 144 | 145 | [[package]] 146 | name = "async-lock" 147 | version = "2.7.0" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" 150 | dependencies = [ 151 | "event-listener", 152 | ] 153 | 154 | [[package]] 155 | name = "async-process" 156 | version = "1.7.0" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" 159 | dependencies = [ 160 | "async-io", 161 | "async-lock", 162 | "autocfg", 163 | "blocking", 164 | "cfg-if", 165 | "event-listener", 166 | "futures-lite", 167 | "rustix 0.37.23", 168 | "signal-hook", 169 | "windows-sys", 170 | ] 171 | 172 | [[package]] 173 | name = "async-recursion" 174 | version = "1.0.4" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" 177 | dependencies = [ 178 | "proc-macro2", 179 | "quote", 180 | "syn 2.0.27", 181 | ] 182 | 183 | [[package]] 184 | name = "async-task" 185 | version = "4.4.0" 186 | source = "registry+https://github.com/rust-lang/crates.io-index" 187 | checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" 188 | 189 | [[package]] 190 | name = "async-trait" 191 | version = "0.1.72" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" 194 | dependencies = [ 195 | "proc-macro2", 196 | "quote", 197 | "syn 2.0.27", 198 | ] 199 | 200 | [[package]] 201 | name = "atomic-waker" 202 | version = "1.1.1" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" 205 | 206 | [[package]] 207 | name = "autocfg" 208 | version = "1.1.0" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 211 | 212 | [[package]] 213 | name = "bitflags" 214 | version = "1.3.2" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 217 | 218 | [[package]] 219 | name = "bitflags" 220 | version = "2.3.3" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" 223 | 224 | [[package]] 225 | name = "block-buffer" 226 | version = "0.10.4" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 229 | dependencies = [ 230 | "generic-array", 231 | ] 232 | 233 | [[package]] 234 | name = "blocking" 235 | version = "1.3.1" 236 | source = "registry+https://github.com/rust-lang/crates.io-index" 237 | checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" 238 | dependencies = [ 239 | "async-channel", 240 | "async-lock", 241 | "async-task", 242 | "atomic-waker", 243 | "fastrand 1.9.0", 244 | "futures-lite", 245 | "log", 246 | ] 247 | 248 | [[package]] 249 | name = "brightness" 250 | version = "0.5.0" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "1ccf3c64278486354c6c41b71293570a207684a34cceb53137975d781748d33f" 253 | dependencies = [ 254 | "async-trait", 255 | "blocking", 256 | "cfg-if", 257 | "futures", 258 | "itertools", 259 | "thiserror", 260 | "windows", 261 | "zbus", 262 | ] 263 | 264 | [[package]] 265 | name = "bstr" 266 | version = "1.6.0" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" 269 | dependencies = [ 270 | "memchr", 271 | "regex-automata", 272 | "serde", 273 | ] 274 | 275 | [[package]] 276 | name = "byteorder" 277 | version = "1.4.3" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 280 | 281 | [[package]] 282 | name = "cc" 283 | version = "1.0.79" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 286 | 287 | [[package]] 288 | name = "cfg-if" 289 | version = "1.0.0" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 292 | 293 | [[package]] 294 | name = "clap" 295 | version = "4.3.19" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" 298 | dependencies = [ 299 | "clap_builder", 300 | "clap_derive", 301 | "once_cell", 302 | ] 303 | 304 | [[package]] 305 | name = "clap_builder" 306 | version = "4.3.19" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" 309 | dependencies = [ 310 | "anstream", 311 | "anstyle", 312 | "clap_lex", 313 | "strsim", 314 | ] 315 | 316 | [[package]] 317 | name = "clap_derive" 318 | version = "4.3.12" 319 | source = "registry+https://github.com/rust-lang/crates.io-index" 320 | checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" 321 | dependencies = [ 322 | "heck", 323 | "proc-macro2", 324 | "quote", 325 | "syn 2.0.27", 326 | ] 327 | 328 | [[package]] 329 | name = "clap_lex" 330 | version = "0.5.0" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" 333 | 334 | [[package]] 335 | name = "colorchoice" 336 | version = "1.0.0" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" 339 | 340 | [[package]] 341 | name = "colored" 342 | version = "2.0.4" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" 345 | dependencies = [ 346 | "is-terminal", 347 | "lazy_static", 348 | "windows-sys", 349 | ] 350 | 351 | [[package]] 352 | name = "concurrent-queue" 353 | version = "2.2.0" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" 356 | dependencies = [ 357 | "crossbeam-utils", 358 | ] 359 | 360 | [[package]] 361 | name = "cpufeatures" 362 | version = "0.2.9" 363 | source = "registry+https://github.com/rust-lang/crates.io-index" 364 | checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" 365 | dependencies = [ 366 | "libc", 367 | ] 368 | 369 | [[package]] 370 | name = "crossbeam-utils" 371 | version = "0.8.16" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 374 | dependencies = [ 375 | "cfg-if", 376 | ] 377 | 378 | [[package]] 379 | name = "crypto-common" 380 | version = "0.1.6" 381 | source = "registry+https://github.com/rust-lang/crates.io-index" 382 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 383 | dependencies = [ 384 | "generic-array", 385 | "typenum", 386 | ] 387 | 388 | [[package]] 389 | name = "derivative" 390 | version = "2.2.0" 391 | source = "registry+https://github.com/rust-lang/crates.io-index" 392 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 393 | dependencies = [ 394 | "proc-macro2", 395 | "quote", 396 | "syn 1.0.109", 397 | ] 398 | 399 | [[package]] 400 | name = "difflib" 401 | version = "0.4.0" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" 404 | 405 | [[package]] 406 | name = "digest" 407 | version = "0.10.7" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 410 | dependencies = [ 411 | "block-buffer", 412 | "crypto-common", 413 | ] 414 | 415 | [[package]] 416 | name = "doc-comment" 417 | version = "0.3.3" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" 420 | 421 | [[package]] 422 | name = "either" 423 | version = "1.9.0" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" 426 | 427 | [[package]] 428 | name = "enumflags2" 429 | version = "0.7.7" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" 432 | dependencies = [ 433 | "enumflags2_derive", 434 | "serde", 435 | ] 436 | 437 | [[package]] 438 | name = "enumflags2_derive" 439 | version = "0.7.7" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" 442 | dependencies = [ 443 | "proc-macro2", 444 | "quote", 445 | "syn 2.0.27", 446 | ] 447 | 448 | [[package]] 449 | name = "equivalent" 450 | version = "1.0.1" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 453 | 454 | [[package]] 455 | name = "errno" 456 | version = "0.3.1" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" 459 | dependencies = [ 460 | "errno-dragonfly", 461 | "libc", 462 | "windows-sys", 463 | ] 464 | 465 | [[package]] 466 | name = "errno-dragonfly" 467 | version = "0.1.2" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 470 | dependencies = [ 471 | "cc", 472 | "libc", 473 | ] 474 | 475 | [[package]] 476 | name = "event-listener" 477 | version = "2.5.3" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 480 | 481 | [[package]] 482 | name = "fastrand" 483 | version = "1.9.0" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 486 | dependencies = [ 487 | "instant", 488 | ] 489 | 490 | [[package]] 491 | name = "fastrand" 492 | version = "2.0.0" 493 | source = "registry+https://github.com/rust-lang/crates.io-index" 494 | checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" 495 | 496 | [[package]] 497 | name = "float-cmp" 498 | version = "0.9.0" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" 501 | dependencies = [ 502 | "num-traits", 503 | ] 504 | 505 | [[package]] 506 | name = "futures" 507 | version = "0.3.28" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" 510 | dependencies = [ 511 | "futures-channel", 512 | "futures-core", 513 | "futures-executor", 514 | "futures-io", 515 | "futures-sink", 516 | "futures-task", 517 | "futures-util", 518 | ] 519 | 520 | [[package]] 521 | name = "futures-channel" 522 | version = "0.3.28" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" 525 | dependencies = [ 526 | "futures-core", 527 | "futures-sink", 528 | ] 529 | 530 | [[package]] 531 | name = "futures-core" 532 | version = "0.3.28" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 535 | 536 | [[package]] 537 | name = "futures-executor" 538 | version = "0.3.28" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" 541 | dependencies = [ 542 | "futures-core", 543 | "futures-task", 544 | "futures-util", 545 | ] 546 | 547 | [[package]] 548 | name = "futures-io" 549 | version = "0.3.28" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" 552 | 553 | [[package]] 554 | name = "futures-lite" 555 | version = "1.13.0" 556 | source = "registry+https://github.com/rust-lang/crates.io-index" 557 | checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" 558 | dependencies = [ 559 | "fastrand 1.9.0", 560 | "futures-core", 561 | "futures-io", 562 | "memchr", 563 | "parking", 564 | "pin-project-lite", 565 | "waker-fn", 566 | ] 567 | 568 | [[package]] 569 | name = "futures-macro" 570 | version = "0.3.28" 571 | source = "registry+https://github.com/rust-lang/crates.io-index" 572 | checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" 573 | dependencies = [ 574 | "proc-macro2", 575 | "quote", 576 | "syn 2.0.27", 577 | ] 578 | 579 | [[package]] 580 | name = "futures-sink" 581 | version = "0.3.28" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 584 | 585 | [[package]] 586 | name = "futures-task" 587 | version = "0.3.28" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 590 | 591 | [[package]] 592 | name = "futures-util" 593 | version = "0.3.28" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 596 | dependencies = [ 597 | "futures-channel", 598 | "futures-core", 599 | "futures-io", 600 | "futures-macro", 601 | "futures-sink", 602 | "futures-task", 603 | "memchr", 604 | "pin-project-lite", 605 | "pin-utils", 606 | "slab", 607 | ] 608 | 609 | [[package]] 610 | name = "generic-array" 611 | version = "0.14.7" 612 | source = "registry+https://github.com/rust-lang/crates.io-index" 613 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 614 | dependencies = [ 615 | "typenum", 616 | "version_check", 617 | ] 618 | 619 | [[package]] 620 | name = "getrandom" 621 | version = "0.2.10" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" 624 | dependencies = [ 625 | "cfg-if", 626 | "libc", 627 | "wasi", 628 | ] 629 | 630 | [[package]] 631 | name = "hashbrown" 632 | version = "0.14.0" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" 635 | 636 | [[package]] 637 | name = "heck" 638 | version = "0.4.1" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 641 | 642 | [[package]] 643 | name = "hermit-abi" 644 | version = "0.3.2" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" 647 | 648 | [[package]] 649 | name = "hex" 650 | version = "0.4.3" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 653 | 654 | [[package]] 655 | name = "indexmap" 656 | version = "2.0.0" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" 659 | dependencies = [ 660 | "equivalent", 661 | "hashbrown", 662 | ] 663 | 664 | [[package]] 665 | name = "instant" 666 | version = "0.1.12" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 669 | dependencies = [ 670 | "cfg-if", 671 | ] 672 | 673 | [[package]] 674 | name = "io-lifetimes" 675 | version = "1.0.11" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" 678 | dependencies = [ 679 | "hermit-abi", 680 | "libc", 681 | "windows-sys", 682 | ] 683 | 684 | [[package]] 685 | name = "is-terminal" 686 | version = "0.4.9" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" 689 | dependencies = [ 690 | "hermit-abi", 691 | "rustix 0.38.4", 692 | "windows-sys", 693 | ] 694 | 695 | [[package]] 696 | name = "itertools" 697 | version = "0.10.5" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 700 | dependencies = [ 701 | "either", 702 | ] 703 | 704 | [[package]] 705 | name = "lazy_static" 706 | version = "1.4.0" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 709 | 710 | [[package]] 711 | name = "libc" 712 | version = "0.2.147" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" 715 | 716 | [[package]] 717 | name = "linux-raw-sys" 718 | version = "0.3.8" 719 | source = "registry+https://github.com/rust-lang/crates.io-index" 720 | checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" 721 | 722 | [[package]] 723 | name = "linux-raw-sys" 724 | version = "0.4.3" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" 727 | 728 | [[package]] 729 | name = "log" 730 | version = "0.4.19" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" 733 | 734 | [[package]] 735 | name = "memchr" 736 | version = "2.5.0" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 739 | 740 | [[package]] 741 | name = "memoffset" 742 | version = "0.7.1" 743 | source = "registry+https://github.com/rust-lang/crates.io-index" 744 | checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" 745 | dependencies = [ 746 | "autocfg", 747 | ] 748 | 749 | [[package]] 750 | name = "nix" 751 | version = "0.26.2" 752 | source = "registry+https://github.com/rust-lang/crates.io-index" 753 | checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" 754 | dependencies = [ 755 | "bitflags 1.3.2", 756 | "cfg-if", 757 | "libc", 758 | "memoffset", 759 | "static_assertions", 760 | ] 761 | 762 | [[package]] 763 | name = "normalize-line-endings" 764 | version = "0.3.0" 765 | source = "registry+https://github.com/rust-lang/crates.io-index" 766 | checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" 767 | 768 | [[package]] 769 | name = "num-traits" 770 | version = "0.2.16" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" 773 | dependencies = [ 774 | "autocfg", 775 | ] 776 | 777 | [[package]] 778 | name = "once_cell" 779 | version = "1.18.0" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 782 | 783 | [[package]] 784 | name = "ordered-stream" 785 | version = "0.2.0" 786 | source = "registry+https://github.com/rust-lang/crates.io-index" 787 | checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" 788 | dependencies = [ 789 | "futures-core", 790 | "pin-project-lite", 791 | ] 792 | 793 | [[package]] 794 | name = "parking" 795 | version = "2.1.0" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" 798 | 799 | [[package]] 800 | name = "pin-project-lite" 801 | version = "0.2.10" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" 804 | 805 | [[package]] 806 | name = "pin-utils" 807 | version = "0.1.0" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 810 | 811 | [[package]] 812 | name = "polling" 813 | version = "2.8.0" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" 816 | dependencies = [ 817 | "autocfg", 818 | "bitflags 1.3.2", 819 | "cfg-if", 820 | "concurrent-queue", 821 | "libc", 822 | "log", 823 | "pin-project-lite", 824 | "windows-sys", 825 | ] 826 | 827 | [[package]] 828 | name = "ppv-lite86" 829 | version = "0.2.17" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 832 | 833 | [[package]] 834 | name = "predicates" 835 | version = "3.0.3" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" 838 | dependencies = [ 839 | "anstyle", 840 | "difflib", 841 | "float-cmp", 842 | "itertools", 843 | "normalize-line-endings", 844 | "predicates-core", 845 | "regex", 846 | ] 847 | 848 | [[package]] 849 | name = "predicates-core" 850 | version = "1.0.6" 851 | source = "registry+https://github.com/rust-lang/crates.io-index" 852 | checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" 853 | 854 | [[package]] 855 | name = "predicates-tree" 856 | version = "1.0.9" 857 | source = "registry+https://github.com/rust-lang/crates.io-index" 858 | checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" 859 | dependencies = [ 860 | "predicates-core", 861 | "termtree", 862 | ] 863 | 864 | [[package]] 865 | name = "proc-macro-crate" 866 | version = "1.3.1" 867 | source = "registry+https://github.com/rust-lang/crates.io-index" 868 | checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" 869 | dependencies = [ 870 | "once_cell", 871 | "toml_edit", 872 | ] 873 | 874 | [[package]] 875 | name = "proc-macro2" 876 | version = "1.0.66" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" 879 | dependencies = [ 880 | "unicode-ident", 881 | ] 882 | 883 | [[package]] 884 | name = "quote" 885 | version = "1.0.32" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" 888 | dependencies = [ 889 | "proc-macro2", 890 | ] 891 | 892 | [[package]] 893 | name = "rand" 894 | version = "0.8.5" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 897 | dependencies = [ 898 | "libc", 899 | "rand_chacha", 900 | "rand_core", 901 | ] 902 | 903 | [[package]] 904 | name = "rand_chacha" 905 | version = "0.3.1" 906 | source = "registry+https://github.com/rust-lang/crates.io-index" 907 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 908 | dependencies = [ 909 | "ppv-lite86", 910 | "rand_core", 911 | ] 912 | 913 | [[package]] 914 | name = "rand_core" 915 | version = "0.6.4" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 918 | dependencies = [ 919 | "getrandom", 920 | ] 921 | 922 | [[package]] 923 | name = "redox_syscall" 924 | version = "0.3.5" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 927 | dependencies = [ 928 | "bitflags 1.3.2", 929 | ] 930 | 931 | [[package]] 932 | name = "regex" 933 | version = "1.9.1" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" 936 | dependencies = [ 937 | "aho-corasick", 938 | "memchr", 939 | "regex-automata", 940 | "regex-syntax", 941 | ] 942 | 943 | [[package]] 944 | name = "regex-automata" 945 | version = "0.3.3" 946 | source = "registry+https://github.com/rust-lang/crates.io-index" 947 | checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" 948 | dependencies = [ 949 | "aho-corasick", 950 | "memchr", 951 | "regex-syntax", 952 | ] 953 | 954 | [[package]] 955 | name = "regex-syntax" 956 | version = "0.7.4" 957 | source = "registry+https://github.com/rust-lang/crates.io-index" 958 | checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" 959 | 960 | [[package]] 961 | name = "rumos" 962 | version = "0.0.6" 963 | dependencies = [ 964 | "assert_cmd", 965 | "brightness", 966 | "clap", 967 | "colored", 968 | "futures", 969 | "predicates", 970 | ] 971 | 972 | [[package]] 973 | name = "rustix" 974 | version = "0.37.23" 975 | source = "registry+https://github.com/rust-lang/crates.io-index" 976 | checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" 977 | dependencies = [ 978 | "bitflags 1.3.2", 979 | "errno", 980 | "io-lifetimes", 981 | "libc", 982 | "linux-raw-sys 0.3.8", 983 | "windows-sys", 984 | ] 985 | 986 | [[package]] 987 | name = "rustix" 988 | version = "0.38.4" 989 | source = "registry+https://github.com/rust-lang/crates.io-index" 990 | checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" 991 | dependencies = [ 992 | "bitflags 2.3.3", 993 | "errno", 994 | "libc", 995 | "linux-raw-sys 0.4.3", 996 | "windows-sys", 997 | ] 998 | 999 | [[package]] 1000 | name = "serde" 1001 | version = "1.0.175" 1002 | source = "registry+https://github.com/rust-lang/crates.io-index" 1003 | checksum = "5d25439cd7397d044e2748a6fe2432b5e85db703d6d097bd014b3c0ad1ebff0b" 1004 | dependencies = [ 1005 | "serde_derive", 1006 | ] 1007 | 1008 | [[package]] 1009 | name = "serde_derive" 1010 | version = "1.0.175" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "b23f7ade6f110613c0d63858ddb8b94c1041f550eab58a16b371bdf2c9c80ab4" 1013 | dependencies = [ 1014 | "proc-macro2", 1015 | "quote", 1016 | "syn 2.0.27", 1017 | ] 1018 | 1019 | [[package]] 1020 | name = "serde_repr" 1021 | version = "0.1.15" 1022 | source = "registry+https://github.com/rust-lang/crates.io-index" 1023 | checksum = "e168eaaf71e8f9bd6037feb05190485708e019f4fd87d161b3c0a0d37daf85e5" 1024 | dependencies = [ 1025 | "proc-macro2", 1026 | "quote", 1027 | "syn 2.0.27", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "sha1" 1032 | version = "0.10.5" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 1035 | dependencies = [ 1036 | "cfg-if", 1037 | "cpufeatures", 1038 | "digest", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "signal-hook" 1043 | version = "0.3.17" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" 1046 | dependencies = [ 1047 | "libc", 1048 | "signal-hook-registry", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "signal-hook-registry" 1053 | version = "1.4.1" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 1056 | dependencies = [ 1057 | "libc", 1058 | ] 1059 | 1060 | [[package]] 1061 | name = "slab" 1062 | version = "0.4.8" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 1065 | dependencies = [ 1066 | "autocfg", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "socket2" 1071 | version = "0.4.9" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 1074 | dependencies = [ 1075 | "libc", 1076 | "winapi", 1077 | ] 1078 | 1079 | [[package]] 1080 | name = "static_assertions" 1081 | version = "1.1.0" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1084 | 1085 | [[package]] 1086 | name = "strsim" 1087 | version = "0.10.0" 1088 | source = "registry+https://github.com/rust-lang/crates.io-index" 1089 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1090 | 1091 | [[package]] 1092 | name = "syn" 1093 | version = "1.0.109" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1096 | dependencies = [ 1097 | "proc-macro2", 1098 | "quote", 1099 | "unicode-ident", 1100 | ] 1101 | 1102 | [[package]] 1103 | name = "syn" 1104 | version = "2.0.27" 1105 | source = "registry+https://github.com/rust-lang/crates.io-index" 1106 | checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" 1107 | dependencies = [ 1108 | "proc-macro2", 1109 | "quote", 1110 | "unicode-ident", 1111 | ] 1112 | 1113 | [[package]] 1114 | name = "tempfile" 1115 | version = "3.7.0" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" 1118 | dependencies = [ 1119 | "cfg-if", 1120 | "fastrand 2.0.0", 1121 | "redox_syscall", 1122 | "rustix 0.38.4", 1123 | "windows-sys", 1124 | ] 1125 | 1126 | [[package]] 1127 | name = "termtree" 1128 | version = "0.4.1" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" 1131 | 1132 | [[package]] 1133 | name = "thiserror" 1134 | version = "1.0.44" 1135 | source = "registry+https://github.com/rust-lang/crates.io-index" 1136 | checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" 1137 | dependencies = [ 1138 | "thiserror-impl", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "thiserror-impl" 1143 | version = "1.0.44" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" 1146 | dependencies = [ 1147 | "proc-macro2", 1148 | "quote", 1149 | "syn 2.0.27", 1150 | ] 1151 | 1152 | [[package]] 1153 | name = "toml_datetime" 1154 | version = "0.6.3" 1155 | source = "registry+https://github.com/rust-lang/crates.io-index" 1156 | checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" 1157 | 1158 | [[package]] 1159 | name = "toml_edit" 1160 | version = "0.19.14" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" 1163 | dependencies = [ 1164 | "indexmap", 1165 | "toml_datetime", 1166 | "winnow", 1167 | ] 1168 | 1169 | [[package]] 1170 | name = "tracing" 1171 | version = "0.1.37" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1174 | dependencies = [ 1175 | "cfg-if", 1176 | "pin-project-lite", 1177 | "tracing-attributes", 1178 | "tracing-core", 1179 | ] 1180 | 1181 | [[package]] 1182 | name = "tracing-attributes" 1183 | version = "0.1.26" 1184 | source = "registry+https://github.com/rust-lang/crates.io-index" 1185 | checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" 1186 | dependencies = [ 1187 | "proc-macro2", 1188 | "quote", 1189 | "syn 2.0.27", 1190 | ] 1191 | 1192 | [[package]] 1193 | name = "tracing-core" 1194 | version = "0.1.31" 1195 | source = "registry+https://github.com/rust-lang/crates.io-index" 1196 | checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" 1197 | dependencies = [ 1198 | "once_cell", 1199 | ] 1200 | 1201 | [[package]] 1202 | name = "typenum" 1203 | version = "1.16.0" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 1206 | 1207 | [[package]] 1208 | name = "uds_windows" 1209 | version = "1.0.2" 1210 | source = "registry+https://github.com/rust-lang/crates.io-index" 1211 | checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" 1212 | dependencies = [ 1213 | "tempfile", 1214 | "winapi", 1215 | ] 1216 | 1217 | [[package]] 1218 | name = "unicode-ident" 1219 | version = "1.0.11" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" 1222 | 1223 | [[package]] 1224 | name = "utf8parse" 1225 | version = "0.2.1" 1226 | source = "registry+https://github.com/rust-lang/crates.io-index" 1227 | checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" 1228 | 1229 | [[package]] 1230 | name = "version_check" 1231 | version = "0.9.4" 1232 | source = "registry+https://github.com/rust-lang/crates.io-index" 1233 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1234 | 1235 | [[package]] 1236 | name = "wait-timeout" 1237 | version = "0.2.0" 1238 | source = "registry+https://github.com/rust-lang/crates.io-index" 1239 | checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" 1240 | dependencies = [ 1241 | "libc", 1242 | ] 1243 | 1244 | [[package]] 1245 | name = "waker-fn" 1246 | version = "1.1.0" 1247 | source = "registry+https://github.com/rust-lang/crates.io-index" 1248 | checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" 1249 | 1250 | [[package]] 1251 | name = "wasi" 1252 | version = "0.11.0+wasi-snapshot-preview1" 1253 | source = "registry+https://github.com/rust-lang/crates.io-index" 1254 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1255 | 1256 | [[package]] 1257 | name = "winapi" 1258 | version = "0.3.9" 1259 | source = "registry+https://github.com/rust-lang/crates.io-index" 1260 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1261 | dependencies = [ 1262 | "winapi-i686-pc-windows-gnu", 1263 | "winapi-x86_64-pc-windows-gnu", 1264 | ] 1265 | 1266 | [[package]] 1267 | name = "winapi-i686-pc-windows-gnu" 1268 | version = "0.4.0" 1269 | source = "registry+https://github.com/rust-lang/crates.io-index" 1270 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1271 | 1272 | [[package]] 1273 | name = "winapi-x86_64-pc-windows-gnu" 1274 | version = "0.4.0" 1275 | source = "registry+https://github.com/rust-lang/crates.io-index" 1276 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1277 | 1278 | [[package]] 1279 | name = "windows" 1280 | version = "0.39.0" 1281 | source = "registry+https://github.com/rust-lang/crates.io-index" 1282 | checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" 1283 | dependencies = [ 1284 | "windows_aarch64_msvc 0.39.0", 1285 | "windows_i686_gnu 0.39.0", 1286 | "windows_i686_msvc 0.39.0", 1287 | "windows_x86_64_gnu 0.39.0", 1288 | "windows_x86_64_msvc 0.39.0", 1289 | ] 1290 | 1291 | [[package]] 1292 | name = "windows-sys" 1293 | version = "0.48.0" 1294 | source = "registry+https://github.com/rust-lang/crates.io-index" 1295 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1296 | dependencies = [ 1297 | "windows-targets", 1298 | ] 1299 | 1300 | [[package]] 1301 | name = "windows-targets" 1302 | version = "0.48.1" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" 1305 | dependencies = [ 1306 | "windows_aarch64_gnullvm", 1307 | "windows_aarch64_msvc 0.48.0", 1308 | "windows_i686_gnu 0.48.0", 1309 | "windows_i686_msvc 0.48.0", 1310 | "windows_x86_64_gnu 0.48.0", 1311 | "windows_x86_64_gnullvm", 1312 | "windows_x86_64_msvc 0.48.0", 1313 | ] 1314 | 1315 | [[package]] 1316 | name = "windows_aarch64_gnullvm" 1317 | version = "0.48.0" 1318 | source = "registry+https://github.com/rust-lang/crates.io-index" 1319 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 1320 | 1321 | [[package]] 1322 | name = "windows_aarch64_msvc" 1323 | version = "0.39.0" 1324 | source = "registry+https://github.com/rust-lang/crates.io-index" 1325 | checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" 1326 | 1327 | [[package]] 1328 | name = "windows_aarch64_msvc" 1329 | version = "0.48.0" 1330 | source = "registry+https://github.com/rust-lang/crates.io-index" 1331 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 1332 | 1333 | [[package]] 1334 | name = "windows_i686_gnu" 1335 | version = "0.39.0" 1336 | source = "registry+https://github.com/rust-lang/crates.io-index" 1337 | checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" 1338 | 1339 | [[package]] 1340 | name = "windows_i686_gnu" 1341 | version = "0.48.0" 1342 | source = "registry+https://github.com/rust-lang/crates.io-index" 1343 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 1344 | 1345 | [[package]] 1346 | name = "windows_i686_msvc" 1347 | version = "0.39.0" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" 1350 | 1351 | [[package]] 1352 | name = "windows_i686_msvc" 1353 | version = "0.48.0" 1354 | source = "registry+https://github.com/rust-lang/crates.io-index" 1355 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 1356 | 1357 | [[package]] 1358 | name = "windows_x86_64_gnu" 1359 | version = "0.39.0" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" 1362 | 1363 | [[package]] 1364 | name = "windows_x86_64_gnu" 1365 | version = "0.48.0" 1366 | source = "registry+https://github.com/rust-lang/crates.io-index" 1367 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 1368 | 1369 | [[package]] 1370 | name = "windows_x86_64_gnullvm" 1371 | version = "0.48.0" 1372 | source = "registry+https://github.com/rust-lang/crates.io-index" 1373 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 1374 | 1375 | [[package]] 1376 | name = "windows_x86_64_msvc" 1377 | version = "0.39.0" 1378 | source = "registry+https://github.com/rust-lang/crates.io-index" 1379 | checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" 1380 | 1381 | [[package]] 1382 | name = "windows_x86_64_msvc" 1383 | version = "0.48.0" 1384 | source = "registry+https://github.com/rust-lang/crates.io-index" 1385 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 1386 | 1387 | [[package]] 1388 | name = "winnow" 1389 | version = "0.5.1" 1390 | source = "registry+https://github.com/rust-lang/crates.io-index" 1391 | checksum = "25b5872fa2e10bd067ae946f927e726d7d603eaeb6e02fa6a350e0722d2b8c11" 1392 | dependencies = [ 1393 | "memchr", 1394 | ] 1395 | 1396 | [[package]] 1397 | name = "xdg-home" 1398 | version = "1.0.0" 1399 | source = "registry+https://github.com/rust-lang/crates.io-index" 1400 | checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" 1401 | dependencies = [ 1402 | "nix", 1403 | "winapi", 1404 | ] 1405 | 1406 | [[package]] 1407 | name = "zbus" 1408 | version = "3.14.1" 1409 | source = "registry+https://github.com/rust-lang/crates.io-index" 1410 | checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" 1411 | dependencies = [ 1412 | "async-broadcast", 1413 | "async-executor", 1414 | "async-fs", 1415 | "async-io", 1416 | "async-lock", 1417 | "async-process", 1418 | "async-recursion", 1419 | "async-task", 1420 | "async-trait", 1421 | "blocking", 1422 | "byteorder", 1423 | "derivative", 1424 | "enumflags2", 1425 | "event-listener", 1426 | "futures-core", 1427 | "futures-sink", 1428 | "futures-util", 1429 | "hex", 1430 | "nix", 1431 | "once_cell", 1432 | "ordered-stream", 1433 | "rand", 1434 | "serde", 1435 | "serde_repr", 1436 | "sha1", 1437 | "static_assertions", 1438 | "tracing", 1439 | "uds_windows", 1440 | "winapi", 1441 | "xdg-home", 1442 | "zbus_macros", 1443 | "zbus_names", 1444 | "zvariant", 1445 | ] 1446 | 1447 | [[package]] 1448 | name = "zbus_macros" 1449 | version = "3.14.1" 1450 | source = "registry+https://github.com/rust-lang/crates.io-index" 1451 | checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" 1452 | dependencies = [ 1453 | "proc-macro-crate", 1454 | "proc-macro2", 1455 | "quote", 1456 | "regex", 1457 | "syn 1.0.109", 1458 | "zvariant_utils", 1459 | ] 1460 | 1461 | [[package]] 1462 | name = "zbus_names" 1463 | version = "2.6.0" 1464 | source = "registry+https://github.com/rust-lang/crates.io-index" 1465 | checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" 1466 | dependencies = [ 1467 | "serde", 1468 | "static_assertions", 1469 | "zvariant", 1470 | ] 1471 | 1472 | [[package]] 1473 | name = "zvariant" 1474 | version = "3.15.0" 1475 | source = "registry+https://github.com/rust-lang/crates.io-index" 1476 | checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" 1477 | dependencies = [ 1478 | "byteorder", 1479 | "enumflags2", 1480 | "libc", 1481 | "serde", 1482 | "static_assertions", 1483 | "zvariant_derive", 1484 | ] 1485 | 1486 | [[package]] 1487 | name = "zvariant_derive" 1488 | version = "3.15.0" 1489 | source = "registry+https://github.com/rust-lang/crates.io-index" 1490 | checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" 1491 | dependencies = [ 1492 | "proc-macro-crate", 1493 | "proc-macro2", 1494 | "quote", 1495 | "syn 1.0.109", 1496 | "zvariant_utils", 1497 | ] 1498 | 1499 | [[package]] 1500 | name = "zvariant_utils" 1501 | version = "1.0.1" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" 1504 | dependencies = [ 1505 | "proc-macro2", 1506 | "quote", 1507 | "syn 1.0.109", 1508 | ] 1509 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rumos" 3 | version = "0.0.6" 4 | authors = ["Octagony "] 5 | edition = "2021" 6 | description = "CLI utility for controlling screen brightness" 7 | keywords = ["system","cli","brightness"] 8 | repository = "https://github.com/octagony/rumos" 9 | license = "MIT" 10 | readme = "README.md" 11 | 12 | 13 | [dependencies] 14 | assert_cmd = "2.0.12" 15 | brightness = "0.5.0" 16 | clap = { version = "4.3.10", features = ["derive"] } 17 | colored = "2.0.4" 18 | futures = "0.3.28" 19 | predicates = "3.0.3" 20 | 21 | [profile.release] 22 | opt-level = 3 23 | debug = false 24 | lto = true 25 | incremental = true 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ☀️ Rumos 2 | 3 | CLI utility for controlling screen brightness 4 | 5 | [![asciicast](https://asciinema.org/a/BMPA2AsNL2k22ydjL5yQhCUxT.svg)](https://asciinema.org/a/BMPA2AsNL2k22ydjL5yQhCUxT) 6 | 7 | ## Installation 8 | 9 | - Build from source 10 | 11 | ```bash 12 | Clone repository 13 | git clone https://github.com/octagony/rumos.git 14 | 15 | Build project 16 | cargo build --release 17 | 18 | Find the executable file in target/release 19 | ``` 20 | 21 | - Use cargo install 22 | 23 | ```bash 24 | cargo install rumos 25 | ``` 26 | 27 | ## Usage 28 | 29 | ```bash 30 | Usage: rumos [OPTIONS] 31 | 32 | Commands: 33 | get Get brightness level (in percent) 34 | set Set brightness level (in percent) 35 | inc Increase brightness level (in percent) 36 | dec Decrease brightness level (in percent) 37 | max Set maximum brightness level 38 | min Set mininum brightness level 39 | help Print this message or the help of the given subcommand(s) 40 | 41 | Options: 42 | -q, --quiet Do not output result to console 43 | -p, --percent Print only brightness level(percentage) 44 | -h, --help Print help 45 | -V, --version Print version 46 | ``` 47 | 48 | ## Examples 49 | 50 | - Get brightness level in a percentage 51 | 52 | ```bash 53 | rumos -p get 54 | // 100% 55 | ``` 56 | 57 | - Set the maximum brightness level quietly 58 | ```bash 59 | rumos max -q 60 | // No output 61 | ``` 62 | - Decrease and display only brightness level in a percentage 63 | 64 | ```bash 65 | rumos -p dec 10 66 | // 90% 67 | ``` 68 | 69 | - (Recipe) Use rumos with dunstify. 70 | 71 | You can find a script to control the brightness level [in my DWM config](https://github.com/octagony/dwm-config-files/blob/master/dwm/scripts/brightnessnotifications.sh). In a simplified version you can use this input 72 | 73 | ```bash 74 | dunstify $(rumos -p get) -t 2000 75 | ``` 76 | -------------------------------------------------------------------------------- /src/args.rs: -------------------------------------------------------------------------------- 1 | use clap::{Parser, Subcommand}; 2 | 3 | #[derive(Parser, Debug)] 4 | #[command(author, version, about, long_about = None)] 5 | #[command(propagate_version = true)] 6 | pub struct Cli { 7 | /// Do not output result to console 8 | #[arg(short, long, value_name = "QUET")] 9 | pub quiet: bool, 10 | /// Print only brightness level(percentage) 11 | #[arg(short, long, value_name = "PERCENT")] 12 | pub percent: bool, 13 | #[command(subcommand)] 14 | pub command: Commands, 15 | } 16 | 17 | #[derive(Debug, Subcommand)] 18 | pub enum Commands { 19 | /// Get brightness level (in percent) 20 | Get, 21 | /// Set brightness level (in percent) 22 | Set(SetArgs), 23 | /// Increase brightness level (in percent) 24 | Inc(SetArgs), 25 | /// Decrease brightness level (in percent) 26 | Dec(SetArgs), 27 | /// Set maximum brightness level 28 | Max, 29 | /// Set mininum brightness level 30 | Min, 31 | } 32 | 33 | #[derive(Debug, Parser)] 34 | pub struct SetArgs { 35 | #[arg(value_parser = clap::value_parser!(u32).range(0..=100))] 36 | pub percent: u32, 37 | } 38 | -------------------------------------------------------------------------------- /src/enums.rs: -------------------------------------------------------------------------------- 1 | pub enum BrightMode { 2 | Increase, 3 | Decrease, 4 | } 5 | -------------------------------------------------------------------------------- /src/funcs/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod control_funcs { 2 | use crate::args::{Cli, SetArgs}; 3 | use brightness::Brightness; 4 | use colored::*; 5 | use futures::TryStreamExt; 6 | use std::process::ExitCode; 7 | use crate::enums::BrightMode; 8 | 9 | pub async fn set_brightness(args: &SetArgs) -> Result { 10 | brightness::brightness_devices() 11 | .try_for_each(|mut dev| async move { 12 | if args.percent < 5 { 13 | dev.set(5).await?; 14 | return Ok(()); 15 | } 16 | let _ = dev.set(args.percent).await?; 17 | Ok(()) 18 | }) 19 | .await?; 20 | Ok(ExitCode::SUCCESS) 21 | } 22 | 23 | pub async fn increase_or_decrease_brightness( 24 | args: &SetArgs, 25 | mode: &BrightMode, 26 | ) -> Result { 27 | 28 | brightness::brightness_devices().try_for_each(|mut dev| async move{ 29 | let level = dev.get().await?; 30 | match mode{ 31 | BrightMode::Increase=>{ 32 | if level < 100 { 33 | dev.set(level+args.percent).await?; 34 | }else{ 35 | return Ok(()) 36 | } 37 | } 38 | BrightMode::Decrease=>{ 39 | let calculate_value = dev.get().await? < (args.percent + 5); 40 | if calculate_value { 41 | dev.set(5).await?; 42 | } else { 43 | dev.set(level - args.percent).await?; 44 | } 45 | } 46 | } 47 | Ok(()) 48 | }).await?; 49 | Ok(ExitCode::SUCCESS) 50 | } 51 | 52 | pub async fn print_brightness_lelel(cli: Cli) -> Result { 53 | let _ = brightness::brightness_devices() 54 | .try_for_each(|dev| async move { 55 | let (device, result) = (dev.device_name().await?, dev.get().await?); 56 | if !cli.quiet && !cli.percent { 57 | if result >= 100 { 58 | println!( 59 | "{} brightness level reached ({})", 60 | "Maximum".green().bold(), 61 | "100%".green().bold() 62 | ); 63 | return Ok(()); 64 | } 65 | if result <= 5 { 66 | println!( 67 | "{} brightness level reached ({})", 68 | "Minimum".red().bold(), 69 | "5%".red().bold() 70 | ); 71 | return Ok(()); 72 | } 73 | } 74 | if cli.quiet { 75 | return Ok(()); 76 | } 77 | if cli.percent { 78 | println!("{}", format!("{result}%").yellow().bold()); 79 | return Ok(()); 80 | } 81 | println!( 82 | "Brightness of device {} is {}", 83 | device.blue().bold(), 84 | format!("{result}%").yellow().bold() 85 | ); 86 | Ok(()) 87 | }) 88 | .await; 89 | Ok(ExitCode::SUCCESS) 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | // Executor 2 | use futures::executor; 3 | // Args 4 | mod args; 5 | // Funcs 6 | mod funcs; 7 | // Args 8 | mod enums; 9 | // Setup 10 | mod setup; 11 | //Main 12 | use setup::main_mod; 13 | 14 | fn main() { 15 | let _ = executor::block_on(main_mod::main_launch()); 16 | } 17 | -------------------------------------------------------------------------------- /src/setup/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod main_mod { 2 | use crate::args::{Cli, Commands}; 3 | use crate::funcs::control_funcs; 4 | use brightness::Brightness; 5 | use clap::Parser; 6 | use futures::TryStreamExt; 7 | use crate::enums::BrightMode; 8 | 9 | pub async fn main_launch() -> Result<(), brightness::Error> { 10 | let cli = Cli::parse(); 11 | match &cli.command { 12 | Commands::Get => { 13 | control_funcs::print_brightness_lelel(cli).await?; 14 | } 15 | Commands::Set(args) => { 16 | control_funcs::set_brightness(args).await?; 17 | control_funcs::print_brightness_lelel(cli).await?; 18 | } 19 | Commands::Inc(args) => { 20 | control_funcs::increase_or_decrease_brightness(args, &BrightMode::Increase).await?; 21 | control_funcs::print_brightness_lelel(cli).await?; 22 | } 23 | Commands::Dec(args) => { 24 | control_funcs::increase_or_decrease_brightness(args, &BrightMode::Decrease).await?; 25 | control_funcs::print_brightness_lelel(cli).await?; 26 | } 27 | Commands::Max => { 28 | let _ = brightness::brightness_devices() 29 | .try_for_each(|mut dev| async move { 30 | let _ = dev.set(100).await?; 31 | Ok(()) 32 | }) 33 | .await; 34 | control_funcs::print_brightness_lelel(cli).await?; 35 | } 36 | Commands::Min => { 37 | brightness::brightness_devices() 38 | .try_for_each(|mut dev| async move { 39 | dev.set(5).await?; 40 | Ok(()) 41 | }) 42 | .await?; 43 | control_funcs::print_brightness_lelel(cli).await?; 44 | } 45 | } 46 | Ok(()) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /tests/cli.rs: -------------------------------------------------------------------------------- 1 | #[cfg(test)] 2 | mod tests { 3 | use assert_cmd::Command; 4 | use predicates::prelude::*; 5 | 6 | // TestType 7 | type TestResult = Result<(), brightness::Error>; 8 | 9 | // Helpers 10 | fn set_brightness_for_test() { 11 | let mut cmd = Command::cargo_bin("rumos").unwrap(); 12 | cmd.args(["set", "50"]).assert().success(); 13 | } 14 | 15 | // Tests 16 | #[test] 17 | fn help_with_no_args() -> TestResult { 18 | let mut cmd = Command::cargo_bin("rumos").unwrap(); 19 | cmd.assert() 20 | .failure() 21 | .stderr(predicate::str::contains("Usage")); 22 | Ok(()) 23 | } 24 | 25 | #[test] 26 | fn set_brightness_from_args() -> TestResult { 27 | let mut cmd = Command::cargo_bin("rumos").unwrap(); 28 | let expected = "50"; 29 | cmd.args(["set", expected]) 30 | .assert() 31 | .success() 32 | .stdout(predicate::str::contains(expected)); 33 | Ok(()) 34 | } 35 | 36 | #[test] 37 | fn set_max_brightness() -> TestResult { 38 | let mut cmd = Command::cargo_bin("rumos").unwrap(); 39 | let expected = "Maximum brightness level reached (100%)\n"; 40 | cmd.arg("max").assert().success().stdout(expected); 41 | Ok(()) 42 | } 43 | 44 | #[test] 45 | fn set_min_brightness() -> TestResult { 46 | let mut cmd = Command::cargo_bin("rumos").unwrap(); 47 | let expected = "Minimum brightness level reached (5%)\n"; 48 | cmd.arg("min").assert().success().stdout(expected); 49 | Ok(()) 50 | } 51 | 52 | #[test] 53 | fn decrease_brightness() -> TestResult { 54 | let mut cmd = Command::cargo_bin("rumos").unwrap(); 55 | set_brightness_for_test(); 56 | cmd.args(["dec", "10"]) 57 | .assert() 58 | .success() 59 | .stdout(predicate::str::contains("40")); 60 | Ok(()) 61 | } 62 | 63 | #[test] 64 | fn increase_brightness() -> TestResult { 65 | let mut cmd = Command::cargo_bin("rumos").unwrap(); 66 | set_brightness_for_test(); 67 | cmd.args(["inc", "10"]) 68 | .assert() 69 | .success() 70 | .stdout(predicate::str::contains("60")); 71 | Ok(()) 72 | } 73 | 74 | #[test] 75 | fn quiet_argument() -> TestResult { 76 | let mut cmd = Command::cargo_bin("rumos").unwrap(); 77 | set_brightness_for_test(); 78 | cmd.args(["-q", "inc", "10"]).assert().success().stdout(""); 79 | Ok(()) 80 | } 81 | 82 | #[test] 83 | fn percent_argument() -> TestResult { 84 | let mut cmd = Command::cargo_bin("rumos").unwrap(); 85 | let expected = "40%\n"; 86 | set_brightness_for_test(); 87 | cmd.args(["-p", "dec", "10"]) 88 | .assert() 89 | .success() 90 | .stdout(expected); 91 | Ok(()) 92 | } 93 | } 94 | --------------------------------------------------------------------------------