forked from wathiede/i3xs
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bee2189ae5 | |||
| 3b2c74c01e | |||
| b21a06b622 | |||
| 4fcbf23210 | |||
| b124148b0b | |||
| b9935c991f | |||
| f51bbf62d9 | |||
| 376db0eeb4 | |||
| ee79a10968 | |||
| 2bce347cd5 | |||
| 44c0c21018 | |||
| fefc331dbc | |||
| d0f08bfa1b | |||
| 4819128bda | |||
| ed997b4ba6 | |||
| 292b80b17a | |||
| 793f1f63e9 | |||
| 9c94122d1d | |||
| d2477050b5 | |||
| 62b53199b1 | |||
| 3f92e9dc10 | |||
| 0aa7613ace | |||
| 4d150ac985 |
682
Cargo.lock
generated
682
Cargo.lock
generated
@ -1,534 +1,764 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.6"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
|
||||
dependencies = [
|
||||
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "alsa"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d59934ece7c39ba89796b3cae0e7a56cd0a346a1b6b9194dd3e2a1a48b629249"
|
||||
dependencies = [
|
||||
"alsa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"alsa-sys",
|
||||
"bitflags 0.8.2",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "alsa-sys"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0edcbbf9ef68f15ae1b620f722180b82a98b6f0628d30baa6b8d2a5abc87d58"
|
||||
dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "android-tzdata"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
|
||||
|
||||
[[package]]
|
||||
name = "android_system_properties"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "0.1.6"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.1.0"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.45"
|
||||
version = "1.0.79"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.9"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "158b0bd7d75cbb6bf9c25967a48a2e9f77da95876b858eadfabaa99cd069de6e"
|
||||
dependencies = [
|
||||
"num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.9"
|
||||
version = "0.4.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
|
||||
dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"android-tzdata",
|
||||
"iana-time-zone",
|
||||
"js-sys",
|
||||
"num-traits",
|
||||
"time",
|
||||
"wasm-bindgen",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chrono-tz"
|
||||
version = "0.5.1"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2554a3155fec064362507487171dcc4edc3df60cb10f3a1fb10ed8094822b120"
|
||||
dependencies = [
|
||||
"chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parse-zoneinfo 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chrono 0.4.26",
|
||||
"parse-zoneinfo",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.33.0"
|
||||
version = "2.34.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
||||
dependencies = [
|
||||
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.3.2",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "curl"
|
||||
version = "0.4.24"
|
||||
name = "core-foundation-sys"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
|
||||
|
||||
[[package]]
|
||||
name = "curl"
|
||||
version = "0.4.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22"
|
||||
dependencies = [
|
||||
"curl-sys 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"curl-sys",
|
||||
"libc",
|
||||
"openssl-probe",
|
||||
"openssl-sys",
|
||||
"schannel",
|
||||
"socket2",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "curl-sys"
|
||||
version = "0.4.21"
|
||||
version = "0.4.65+curl-8.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "961ba061c9ef2fe34bbd12b807152d96f0badd2bebe7b90ce6c8c8b7572a0986"
|
||||
dependencies = [
|
||||
"cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc",
|
||||
"libc",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
name = "glob"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
||||
dependencies = [
|
||||
"unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
|
||||
|
||||
[[package]]
|
||||
name = "i3monkit"
|
||||
version = "0.1.2"
|
||||
source = "git+https://github.com/38/i3monkit#d72d94d103b2621ebfc06c9950d3bba9613e4936"
|
||||
source = "git+https://github.com/38/i3monkit#7fefa91faf039c4ee53106565cea5edc0b68f840"
|
||||
dependencies = [
|
||||
"alsa 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chrono 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"curl 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"alsa",
|
||||
"chrono 0.3.0",
|
||||
"curl",
|
||||
"libc",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "i3xs"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chrono-tz 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"i3monkit 0.1.2 (git+https://github.com/38/i3monkit)",
|
||||
"num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chrono 0.4.26",
|
||||
"chrono-tz",
|
||||
"glob",
|
||||
"i3monkit",
|
||||
"num_cpus",
|
||||
"regex",
|
||||
"structopt",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone"
|
||||
version = "0.1.57"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"core-foundation-sys",
|
||||
"iana-time-zone-haiku",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
"windows",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone-haiku"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.4"
|
||||
version = "1.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.62"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.0.25"
|
||||
name = "js-sys"
|
||||
version = "0.3.64"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
|
||||
dependencies = [
|
||||
"cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.2.1"
|
||||
name = "libc"
|
||||
version = "0.2.147"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
||||
|
||||
[[package]]
|
||||
name = "num"
|
||||
version = "0.1.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
|
||||
dependencies = [
|
||||
"num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer",
|
||||
"num-iter",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.41"
|
||||
version = "0.1.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
|
||||
dependencies = [
|
||||
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"autocfg",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-iter"
|
||||
version = "0.1.39"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
|
||||
dependencies = [
|
||||
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"autocfg",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.8"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
|
||||
dependencies = [
|
||||
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.10.1"
|
||||
version = "1.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
|
||||
dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl-probe"
|
||||
version = "0.1.2"
|
||||
name = "once_cell"
|
||||
version = "1.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
|
||||
|
||||
[[package]]
|
||||
name = "openssl-probe"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
||||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.9.49"
|
||||
version = "0.9.90"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6"
|
||||
dependencies = [
|
||||
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc",
|
||||
"libc",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parse-zoneinfo"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41"
|
||||
dependencies = [
|
||||
"regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.16"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "0.4.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
|
||||
dependencies = [
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.4"
|
||||
version = "1.0.66"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
|
||||
dependencies = [
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "0.6.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.30",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.2"
|
||||
version = "1.0.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.66",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.1.56"
|
||||
name = "regex"
|
||||
version = "1.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.3.1"
|
||||
name = "regex-automata"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294"
|
||||
dependencies = [
|
||||
"aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.12"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.0"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
|
||||
|
||||
[[package]]
|
||||
name = "schannel"
|
||||
version = "0.1.16"
|
||||
version = "0.1.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.101"
|
||||
version = "1.0.178"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60363bdd39a7be0266a520dab25fdc9241d2f987b08a01e01f0ec6d06a981348"
|
||||
dependencies = [
|
||||
"serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.101"
|
||||
version = "1.0.178"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f28482318d6641454cb273da158647922d1be6b5a2fcc6165cd89ebdd7ed576b"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.66",
|
||||
"quote 1.0.32",
|
||||
"syn 2.0.27",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.40"
|
||||
version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c"
|
||||
dependencies = [
|
||||
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
version = "0.3.11"
|
||||
version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "structopt"
|
||||
version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "16c2cdbf9cc375f15d1b4141bc48aeef444806655cd0e904207edc8d68d86ed7"
|
||||
dependencies = [
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt-derive 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap",
|
||||
"structopt-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "structopt-derive"
|
||||
version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53010261a84b37689f9ed7d395165029f9cc7abb9f56bbfe86bee2597ed25107"
|
||||
dependencies = [
|
||||
"heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heck",
|
||||
"proc-macro2 0.4.30",
|
||||
"quote 0.6.13",
|
||||
"syn 0.15.44",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "0.15.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.30",
|
||||
"quote 0.6.13",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.5"
|
||||
version = "2.0.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.66",
|
||||
"quote 1.0.32",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
dependencies = [
|
||||
"unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "0.3.6"
|
||||
name = "thiserror"
|
||||
version = "1.0.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.66",
|
||||
"quote 1.0.32",
|
||||
"syn 2.0.27",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.1.42"
|
||||
version = "0.1.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
|
||||
dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc",
|
||||
"wasi",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.3.0"
|
||||
name = "unicode-ident"
|
||||
version = "1.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.6"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.7"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.10.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"log",
|
||||
"once_cell",
|
||||
"proc-macro2 1.0.66",
|
||||
"quote 1.0.32",
|
||||
"syn 2.0.27",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
|
||||
dependencies = [
|
||||
"quote 1.0.32",
|
||||
"wasm-bindgen-macro-support",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.66",
|
||||
"quote 1.0.32",
|
||||
"syn 2.0.27",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.8"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[metadata]
|
||||
"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
|
||||
"checksum alsa 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d59934ece7c39ba89796b3cae0e7a56cd0a346a1b6b9194dd3e2a1a48b629249"
|
||||
"checksum alsa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b0edcbbf9ef68f15ae1b620f722180b82a98b6f0628d30baa6b8d2a5abc87d58"
|
||||
"checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875"
|
||||
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
|
||||
"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd"
|
||||
"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be"
|
||||
"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33"
|
||||
"checksum chrono 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "158b0bd7d75cbb6bf9c25967a48a2e9f77da95876b858eadfabaa99cd069de6e"
|
||||
"checksum chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e8493056968583b0193c1bb04d6f7684586f3726992d6c573261941a895dbd68"
|
||||
"checksum chrono-tz 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e0e430fad0384e4defc3dc6b1223d1b886087a8bf9b7080e5ae027f73851ea15"
|
||||
"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
|
||||
"checksum curl 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "d08ad3cb89d076a36b0ce5749eec2c9964f70c0c58480ab6b75a91ec4fc206d8"
|
||||
"checksum curl-sys 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)" = "520594da9914c1dc77ce3be450fc1c74fde67c82966d80f8e93c6d460eb0e9ae"
|
||||
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
|
||||
"checksum i3monkit 0.1.2 (git+https://github.com/38/i3monkit)" = "<none>"
|
||||
"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
|
||||
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
|
||||
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
|
||||
"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
|
||||
"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
|
||||
"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09"
|
||||
"checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e"
|
||||
"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32"
|
||||
"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273"
|
||||
"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
|
||||
"checksum openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)" = "f4fad9e54bd23bd4cbbe48fdc08a1b8091707ac869ef8508edea2fec77dcc884"
|
||||
"checksum parse-zoneinfo 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "089a398ccdcdd77b8c38909d5a1e4b67da1bc4c9dbfe6d5b536c828eddb779e5"
|
||||
"checksum pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "72d5370d90f49f70bd033c3d75e87fc529fbfff9d6f7cccef07d6170079d91ea"
|
||||
"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
|
||||
"checksum proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afdc77cc74ec70ed262262942ebb7dac3d479e9e5cfa2da1841c0806f6cdabcc"
|
||||
"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
|
||||
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
|
||||
"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
|
||||
"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd"
|
||||
"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716"
|
||||
"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997"
|
||||
"checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021"
|
||||
"checksum serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd"
|
||||
"checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e"
|
||||
"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704"
|
||||
"checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85"
|
||||
"checksum structopt 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "16c2cdbf9cc375f15d1b4141bc48aeef444806655cd0e904207edc8d68d86ed7"
|
||||
"checksum structopt-derive 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "53010261a84b37689f9ed7d395165029f9cc7abb9f56bbfe86bee2597ed25107"
|
||||
"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
|
||||
"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf"
|
||||
"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
|
||||
"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
|
||||
"checksum unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1967f4cdfc355b37fd76d2a954fb2ed3871034eb4f26d60537d88795cfc332a9"
|
||||
"checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20"
|
||||
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||
"checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95"
|
||||
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.48.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
|
||||
|
||||
@ -21,7 +21,10 @@ path = "src/bin/home.rs"
|
||||
[dependencies]
|
||||
# Use git until ColorRGB is pub in crates
|
||||
i3monkit = {git = "https://github.com/38/i3monkit"} # "0.1.2"
|
||||
num_cpus = "1.0"
|
||||
num_cpus = "1.15"
|
||||
structopt = { version = "0.2", default-features = false }
|
||||
chrono = "0.4"
|
||||
chrono-tz = "0.5"
|
||||
glob = "0.3.1"
|
||||
thiserror = "1.0.40"
|
||||
regex = "1.9.1"
|
||||
|
||||
10
README.md
Normal file
10
README.md
Normal file
@ -0,0 +1,10 @@
|
||||
# Dev instructions
|
||||
|
||||
```
|
||||
# Run a test nested X server with dimensions tuned for i3 status bar work
|
||||
$ Xephyr :1 -screen 1280x200 &
|
||||
# Run i3 with a custome socket directory so you don't clash with any
|
||||
# preexisting ones.
|
||||
# TODO(wathiede): write stripped down i3 config and use it
|
||||
$ I3SOCK=/tmp/i3 DISPLAY=:1 i3
|
||||
```
|
||||
@ -1,38 +1,42 @@
|
||||
use chrono::NaiveTime;
|
||||
|
||||
use i3monkit::{ColorRGB, Header, I3Protocol, WidgetCollection};
|
||||
|
||||
use i3monkit::{widgets::VolumeWidget, ColorRGB, Header, I3Protocol, WidgetCollection};
|
||||
use i3xs::widgets::{
|
||||
cpu::CpuWidget,
|
||||
datetime::{DateTimeWidget, TimeColor},
|
||||
disk::AllDiskSpeedWidget,
|
||||
network::AllNetworkSpeedWidget,
|
||||
power::PowerSupply,
|
||||
};
|
||||
use structopt::StructOpt;
|
||||
|
||||
use i3xs::widgets::cpu::CpuWidget;
|
||||
use i3xs::widgets::datetime::{DateTimeWidget, TimeColor};
|
||||
use i3xs::widgets::network::NetworkSpeedWidget;
|
||||
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[structopt(name = "i3xs", about = "Custom i3 status bar program.")]
|
||||
struct Opt {
|
||||
#[structopt(short, long)]
|
||||
nic: String,
|
||||
}
|
||||
struct Opt {}
|
||||
|
||||
fn main() {
|
||||
let mut bar = WidgetCollection::new();
|
||||
|
||||
let opts = Opt::from_args();
|
||||
let _opts = Opt::from_args();
|
||||
|
||||
bar.push(CpuWidget::new());
|
||||
bar.push(PowerSupply::default());
|
||||
bar.push(CpuWidget::default());
|
||||
|
||||
// Realtime upload/download rate for a interface
|
||||
bar.push(NetworkSpeedWidget::new(&opts.nic, 6));
|
||||
// Realtime upload/download rate for a any active NICs
|
||||
bar.push(AllNetworkSpeedWidget::new(6));
|
||||
|
||||
// Realtime read/write rate for a any active disks
|
||||
bar.push(AllDiskSpeedWidget::new(6));
|
||||
|
||||
bar.push(VolumeWidget::new("default", "Master", 0));
|
||||
|
||||
let mut dt = DateTimeWidget::new("%m/%d %H:%M");
|
||||
dt.set_colors(vec![
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(19, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(19, 0, 0).unwrap(),
|
||||
color: ColorRGB::yellow(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(20, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(20, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
]);
|
||||
|
||||
@ -1,71 +1,78 @@
|
||||
use chrono::NaiveTime;
|
||||
|
||||
use i3monkit::{ColorRGB, Header, I3Protocol, WidgetCollection};
|
||||
|
||||
use i3monkit::{widgets::VolumeWidget, ColorRGB, Header, I3Protocol, WidgetCollection};
|
||||
use i3xs::widgets::{
|
||||
cpu::CpuWidget,
|
||||
datetime::{DateTimeWidget, TimeColor},
|
||||
disk::AllDiskSpeedWidget,
|
||||
network::AllNetworkSpeedWidget,
|
||||
power::PowerSupply,
|
||||
};
|
||||
use structopt::StructOpt;
|
||||
|
||||
use i3xs::widgets::cpu::CpuWidget;
|
||||
use i3xs::widgets::datetime::{DateTimeWidget, TimeColor};
|
||||
use i3xs::widgets::network::NetworkSpeedWidget;
|
||||
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[structopt(name = "i3xs", about = "Custom i3 status bar program.")]
|
||||
struct Opt {
|
||||
#[structopt(short, long)]
|
||||
nic: String,
|
||||
}
|
||||
struct Opt {}
|
||||
|
||||
fn main() {
|
||||
let mut bar = WidgetCollection::new();
|
||||
|
||||
let opts = Opt::from_args();
|
||||
let _opts = Opt::from_args();
|
||||
|
||||
bar.push(CpuWidget::new());
|
||||
bar.push(PowerSupply::default());
|
||||
bar.push(CpuWidget::default());
|
||||
|
||||
// Realtime upload/download rate for a interface
|
||||
bar.push(NetworkSpeedWidget::new(&opts.nic, 6));
|
||||
bar.push(AllNetworkSpeedWidget::new(6));
|
||||
|
||||
let mut dt = DateTimeWidget::tz("%H:%M %Z", chrono_tz::Europe::London);
|
||||
// Realtime read/write rate for a any active disks
|
||||
bar.push(AllDiskSpeedWidget::new(6));
|
||||
|
||||
// Setup time in Amsterdam widget with end of day warnings
|
||||
let mut dt = DateTimeWidget::tz("%H:%M %Z", chrono_tz::Europe::Amsterdam);
|
||||
dt.set_colors(vec![
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(0, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(0, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(8, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(8, 0, 0).unwrap(),
|
||||
color: ColorRGB(255, 255, 255),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(17, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(17, 0, 0).unwrap(),
|
||||
color: ColorRGB::yellow(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(18, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(18, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
]);
|
||||
bar.push(dt);
|
||||
|
||||
bar.push(VolumeWidget::new("default", "Master", 0));
|
||||
|
||||
let mut dt = DateTimeWidget::new("%m/%d %H:%M");
|
||||
dt.set_colors(vec![
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(0, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(0, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(7, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(7, 0, 0).unwrap(),
|
||||
color: ColorRGB(255, 255, 255),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(15, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(15, 0, 0).unwrap(),
|
||||
color: ColorRGB::yellow(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(16, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(16, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
]);
|
||||
bar.push(dt);
|
||||
let dt_utc = DateTimeWidget::tz("UTC %H:%M", chrono::offset::Utc);
|
||||
bar.push(dt_utc);
|
||||
|
||||
// Then start updating the status bar
|
||||
bar.update_loop(I3Protocol::new(Header::new(1), std::io::stdout()));
|
||||
|
||||
15
src/colors.rs
Normal file
15
src/colors.rs
Normal file
@ -0,0 +1,15 @@
|
||||
use i3monkit::ColorRGB;
|
||||
|
||||
pub const WHITE: ColorRGB = ColorRGB(255, 255, 255);
|
||||
|
||||
pub fn lerp(c1: ColorRGB, c2: ColorRGB, alpha: f32) -> ColorRGB {
|
||||
ColorRGB(
|
||||
(c1.0 as f32 * (1. - alpha) + c2.0 as f32 * alpha) as u8,
|
||||
(c1.1 as f32 * (1. - alpha) + c2.1 as f32 * alpha) as u8,
|
||||
(c1.2 as f32 * (1. - alpha) + c2.2 as f32 * alpha) as u8,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn to_string(c: ColorRGB) -> String {
|
||||
format!("#{:02x}{:02x}{:02x}", c.0, c.1, c.2)
|
||||
}
|
||||
@ -1,2 +1,3 @@
|
||||
pub mod colors;
|
||||
pub mod spark;
|
||||
pub mod widgets;
|
||||
|
||||
@ -4,7 +4,7 @@ use std::io::{BufRead, BufReader, Result};
|
||||
|
||||
use i3monkit::{Block, ColorRGB, Widget, WidgetUpdate};
|
||||
|
||||
use crate::spark;
|
||||
use crate::{colors, spark};
|
||||
|
||||
#[derive(Debug)]
|
||||
struct Stat {
|
||||
@ -20,18 +20,6 @@ pub struct CpuWidget {
|
||||
history: Vec<VecDeque<f32>>,
|
||||
}
|
||||
|
||||
fn color_lerp(c1: ColorRGB, c2: ColorRGB, alpha: f32) -> ColorRGB {
|
||||
ColorRGB(
|
||||
(c1.0 as f32 * (1. - alpha) + c2.0 as f32 * alpha) as u8,
|
||||
(c1.1 as f32 * (1. - alpha) + c2.1 as f32 * alpha) as u8,
|
||||
(c1.2 as f32 * (1. - alpha) + c2.2 as f32 * alpha) as u8,
|
||||
)
|
||||
}
|
||||
|
||||
fn color_to_string(c: ColorRGB) -> String {
|
||||
format!("#{:02x}{:02x}{:02x}", c.0, c.1, c.2)
|
||||
}
|
||||
|
||||
impl CpuWidget {
|
||||
fn read_status() -> Result<Vec<Stat>> {
|
||||
let file = File::open("/proc/stat")?;
|
||||
@ -42,14 +30,18 @@ impl CpuWidget {
|
||||
let tokens: Vec<_> = line.trim().split(|c| c == ' ' || c == '\t').collect();
|
||||
// The sum total CPU entry has a space instead of a number, so we skip the line when
|
||||
// there's an extra empty column.
|
||||
if tokens[1] == "" {
|
||||
if tokens[1].is_empty() {
|
||||
continue;
|
||||
}
|
||||
if tokens[0].starts_with("cpu") {
|
||||
let parsed = tokens[1..5]
|
||||
.iter()
|
||||
.map(|x| u64::from_str_radix(x, 10).unwrap())
|
||||
.map(|x| x.parse::<u64>().unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
// [0] user
|
||||
// [1] nice
|
||||
// [2] system
|
||||
// [3] idle
|
||||
let usage = parsed[0] + parsed[1] + parsed[2];
|
||||
let total = usage + parsed[3];
|
||||
stats.push(Stat { usage, total })
|
||||
@ -58,20 +50,6 @@ impl CpuWidget {
|
||||
Ok(stats)
|
||||
}
|
||||
|
||||
pub fn new() -> Self {
|
||||
let last_stats = Self::read_status().unwrap();
|
||||
let num_samples = 6;
|
||||
let history = (0..last_stats.len())
|
||||
.map(|_| (0..num_samples).map(|_| 0.).collect::<VecDeque<f32>>())
|
||||
.collect::<Vec<VecDeque<f32>>>();
|
||||
let ret = Self {
|
||||
last_stats,
|
||||
history,
|
||||
};
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
fn draw_history(&mut self) -> Option<String> {
|
||||
let stats = Self::read_status().ok()?;
|
||||
let percentages: Vec<_> = stats
|
||||
@ -97,22 +75,37 @@ impl CpuWidget {
|
||||
.history
|
||||
.iter()
|
||||
.map(|history| {
|
||||
let sg = g.render(&history.iter().map(|v| *v).collect::<Vec<f32>>());
|
||||
let sg = g.render(&history.iter().copied().collect::<Vec<f32>>());
|
||||
history
|
||||
.iter()
|
||||
.zip(sg.chars())
|
||||
.map(|(v, g)| {
|
||||
let c = color_lerp(ColorRGB::green(), ColorRGB::red(), *v);
|
||||
let c = colors::lerp(ColorRGB::green(), ColorRGB::red(), *v);
|
||||
format!(
|
||||
r##"<span foreground="{}">{}</span>"##,
|
||||
color_to_string(c),
|
||||
colors::to_string(c),
|
||||
g
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
.collect();
|
||||
Some(format!("CPU|{}", graphs.join("|")))
|
||||
let joiner = if self.history[0].len() > 1 { "|" } else { "" };
|
||||
Some(format!("CPU|{}", graphs.join(joiner)))
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for CpuWidget {
|
||||
fn default() -> Self {
|
||||
let last_stats = Self::read_status().unwrap();
|
||||
let num_samples = 1;
|
||||
let history = (0..last_stats.len())
|
||||
.map(|_| (0..num_samples).map(|_| 0.).collect::<VecDeque<f32>>())
|
||||
.collect::<Vec<VecDeque<f32>>>();
|
||||
Self {
|
||||
last_stats,
|
||||
history,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
199
src/widgets/disk.rs
Normal file
199
src/widgets/disk.rs
Normal file
@ -0,0 +1,199 @@
|
||||
use std::{collections::vec_deque::VecDeque, io::Result, time::SystemTime};
|
||||
|
||||
use i3monkit::{Block, Widget, WidgetUpdate};
|
||||
|
||||
use crate::spark;
|
||||
|
||||
const DISK_STATS_PAT: &str = "/sys/class/block/*/*/stat";
|
||||
|
||||
struct TransferStat {
|
||||
rx: u64,
|
||||
tx: u64,
|
||||
ts: SystemTime,
|
||||
}
|
||||
|
||||
impl TransferStat {
|
||||
fn read_stat(stat_path: &str) -> Result<Self> {
|
||||
// File format documented at https://www.kernel.org/doc/Documentation/block/stat.txt
|
||||
let s = std::fs::read_to_string(stat_path)?;
|
||||
let parts: Vec<_> = s.split(" ").filter(|s| !s.is_empty()).collect();
|
||||
|
||||
let rx = parts[2].parse().unwrap_or(0) * 512;
|
||||
let tx = parts[6].parse().unwrap_or(0) * 512;
|
||||
let ts = SystemTime::now();
|
||||
|
||||
Ok(Self { rx, tx, ts })
|
||||
}
|
||||
fn duration(&self, earlier: &Self) -> f64 {
|
||||
let duration = self.ts.duration_since(earlier.ts).unwrap();
|
||||
duration.as_secs() as f64 + duration.subsec_nanos() as f64 / 1_000_000_000.0
|
||||
}
|
||||
|
||||
fn rx_rate(&self, earlier: &Self) -> f64 {
|
||||
let duration = self.duration(earlier);
|
||||
if duration < 1e-5 {
|
||||
return std::f64::NAN;
|
||||
}
|
||||
|
||||
(self.rx - earlier.rx) as f64 / duration
|
||||
}
|
||||
|
||||
fn tx_rate(&self, earlier: &Self) -> f64 {
|
||||
let duration = self.duration(earlier);
|
||||
if duration < 1e-5 {
|
||||
return std::f64::NAN;
|
||||
}
|
||||
|
||||
(self.tx - earlier.tx) as f64 / duration
|
||||
}
|
||||
}
|
||||
|
||||
/// A widget that shows the disk R/W realtimely
|
||||
pub struct DiskSpeedWidget {
|
||||
device: String,
|
||||
last_stat: TransferStat,
|
||||
rx_history: VecDeque<f32>,
|
||||
tx_history: VecDeque<f32>,
|
||||
}
|
||||
|
||||
impl DiskSpeedWidget {
|
||||
/// Create the widget, for given device.
|
||||
///
|
||||
/// **device** The interface to monitor
|
||||
pub fn new(device: &str, num_samples: usize) -> Self {
|
||||
let last_stat = TransferStat::read_stat(device).unwrap();
|
||||
let device = device.to_string();
|
||||
let rx_history: VecDeque<f32> = (0..num_samples).map(|_| 1.).collect();
|
||||
let tx_history: VecDeque<f32> = (0..num_samples).map(|_| 1.).collect();
|
||||
Self {
|
||||
last_stat,
|
||||
device,
|
||||
rx_history,
|
||||
tx_history,
|
||||
}
|
||||
}
|
||||
|
||||
fn is_active(&self) -> bool {
|
||||
(self.rx_history.iter().sum::<f32>() + self.tx_history.iter().sum::<f32>()) > 0.
|
||||
}
|
||||
|
||||
fn format_rate(rate: f64) -> String {
|
||||
if rate.is_nan() {
|
||||
return "N/A".to_string();
|
||||
}
|
||||
|
||||
const UNIT_NAME: [&str; 6] = [" B/s", "KB/s", "MB/s", "GB/s", "TB/s", "PB/s"];
|
||||
|
||||
let mut best_unit = UNIT_NAME[0];
|
||||
let mut best_multiplier = 1.0;
|
||||
|
||||
for unit in UNIT_NAME[1..].iter() {
|
||||
if best_multiplier > rate / 1024.0 {
|
||||
break;
|
||||
}
|
||||
best_unit = unit;
|
||||
best_multiplier *= 1024.0
|
||||
}
|
||||
|
||||
format!("{:6.1}{}", rate / best_multiplier, best_unit)
|
||||
}
|
||||
|
||||
fn get_human_readable_stat(&mut self) -> Result<(String, String)> {
|
||||
let cur_stat = TransferStat::read_stat(&self.device)?;
|
||||
|
||||
let rx_rate = cur_stat.rx_rate(&self.last_stat);
|
||||
let tx_rate = cur_stat.tx_rate(&self.last_stat);
|
||||
|
||||
self.rx_history.push_back(rx_rate as f32);
|
||||
self.rx_history.pop_front();
|
||||
self.tx_history.push_back(tx_rate as f32);
|
||||
self.tx_history.pop_front();
|
||||
self.last_stat = cur_stat;
|
||||
|
||||
Ok((Self::format_rate(rx_rate), Self::format_rate(tx_rate)))
|
||||
}
|
||||
|
||||
fn render(&mut self) -> Option<String> {
|
||||
if let Ok((rx, tx)) = self.get_human_readable_stat() {
|
||||
let (rx_history, tx_history) = if self.rx_history.len() > 1 {
|
||||
let g = spark::Graph {
|
||||
min: None,
|
||||
max: None,
|
||||
};
|
||||
(
|
||||
g.render(&self.rx_history.iter().cloned().collect::<Vec<f32>>()),
|
||||
g.render(&self.tx_history.iter().cloned().collect::<Vec<f32>>()),
|
||||
)
|
||||
} else {
|
||||
("".to_string(), "".to_string())
|
||||
};
|
||||
return Some(format!(
|
||||
"R:<tt>{} {}</tt> W:<tt>{} {}</tt> ",
|
||||
rx, rx_history, tx, tx_history
|
||||
));
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl Widget for DiskSpeedWidget {
|
||||
fn update(&mut self) -> Option<WidgetUpdate> {
|
||||
if let Some(text) = self.render() {
|
||||
let mut data = Block::new();
|
||||
data.use_pango();
|
||||
data.append_full_text(&text);
|
||||
return Some(WidgetUpdate {
|
||||
refresh_interval: std::time::Duration::new(1, 0),
|
||||
data: Some(data),
|
||||
});
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AllDiskSpeedWidget {
|
||||
disks: Vec<DiskSpeedWidget>,
|
||||
}
|
||||
impl AllDiskSpeedWidget {
|
||||
pub fn new(num_samples: usize) -> Self {
|
||||
let disks = glob::glob(DISK_STATS_PAT)
|
||||
.expect("couldn't find glob for disks")
|
||||
.map(|path| {
|
||||
let p = path.unwrap().display().to_string();
|
||||
DiskSpeedWidget::new(&p, num_samples)
|
||||
})
|
||||
.collect();
|
||||
|
||||
AllDiskSpeedWidget { disks }
|
||||
}
|
||||
}
|
||||
|
||||
impl Widget for AllDiskSpeedWidget {
|
||||
fn update(&mut self) -> Option<WidgetUpdate> {
|
||||
let disks: Vec<_> = self
|
||||
.disks
|
||||
.iter_mut()
|
||||
.filter_map(|dev| {
|
||||
if !dev.is_active() {
|
||||
return None;
|
||||
}
|
||||
if let Some(text) = dev.render() {
|
||||
let name = dev.device.rsplit("/").skip(1).nth(0).unwrap();
|
||||
Some(format!("{}: {}", name, text))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
let mut data = Block::new();
|
||||
data.use_pango();
|
||||
disks.iter().for_each(|n| {
|
||||
data.append_full_text(n);
|
||||
});
|
||||
Some(WidgetUpdate {
|
||||
refresh_interval: std::time::Duration::new(1, 0),
|
||||
data: Some(data),
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,5 @@
|
||||
pub mod cpu;
|
||||
pub mod datetime;
|
||||
pub mod disk;
|
||||
pub mod network;
|
||||
pub mod power;
|
||||
|
||||
@ -1,16 +1,18 @@
|
||||
use i3monkit::Block;
|
||||
use i3monkit::{Widget, WidgetUpdate};
|
||||
use std::{
|
||||
collections::vec_deque::VecDeque,
|
||||
fs::File,
|
||||
io::{BufRead, BufReader, Error, ErrorKind, Result},
|
||||
path::PathBuf,
|
||||
time::SystemTime,
|
||||
};
|
||||
|
||||
use std::collections::vec_deque::VecDeque;
|
||||
use std::fs::File;
|
||||
use std::io::{BufRead, BufReader, Error, ErrorKind, Result};
|
||||
use std::path::PathBuf;
|
||||
use std::time::SystemTime;
|
||||
use i3monkit::{Block, Widget, WidgetUpdate};
|
||||
use regex::Regex;
|
||||
|
||||
use crate::spark;
|
||||
|
||||
const NETWORK_PATH_PREFIX: &'static str = "/sys/class/net";
|
||||
const NETWORK_STAT_SUFFIX: &'static str = "statistics/dummy";
|
||||
const NETWORK_PATH_PREFIX: &str = "/sys/class/net";
|
||||
const NETWORK_STAT_SUFFIX: &str = "statistics/dummy";
|
||||
|
||||
struct TransferStat {
|
||||
rx: u64,
|
||||
@ -35,20 +37,19 @@ impl TransferStat {
|
||||
return line;
|
||||
}
|
||||
|
||||
return Err(Error::new(ErrorKind::Other, "Empty file"));
|
||||
Err(Error::new(ErrorKind::Other, "Empty file"))
|
||||
};
|
||||
|
||||
let rx = u64::from_str_radix(&(read_stat_file("rx_bytes")?), 10).unwrap();
|
||||
let tx = u64::from_str_radix(&(read_stat_file("tx_bytes")?), 10).unwrap();
|
||||
let rx = (read_stat_file("rx_bytes")?).parse().unwrap();
|
||||
let tx = (read_stat_file("tx_bytes")?).parse().unwrap();
|
||||
let ts = SystemTime::now();
|
||||
|
||||
return Ok(Self { rx, tx, ts });
|
||||
Ok(Self { rx, tx, ts })
|
||||
}
|
||||
|
||||
fn duration(&self, earlier: &Self) -> f64 {
|
||||
let duration = self.ts.duration_since(earlier.ts).unwrap();
|
||||
let secs = duration.as_secs() as f64 + duration.subsec_nanos() as f64 / 1_000_000_000.0;
|
||||
return secs;
|
||||
duration.as_secs() as f64 + duration.subsec_nanos() as f64 / 1_000_000_000.0
|
||||
}
|
||||
|
||||
fn rx_rate(&self, earlier: &Self) -> f64 {
|
||||
@ -57,7 +58,7 @@ impl TransferStat {
|
||||
return std::f64::NAN;
|
||||
}
|
||||
|
||||
return (self.rx - earlier.rx) as f64 / duration;
|
||||
(self.rx - earlier.rx) as f64 / duration
|
||||
}
|
||||
|
||||
fn tx_rate(&self, earlier: &Self) -> f64 {
|
||||
@ -66,7 +67,7 @@ impl TransferStat {
|
||||
return std::f64::NAN;
|
||||
}
|
||||
|
||||
return (self.tx - earlier.tx) as f64 / duration;
|
||||
(self.tx - earlier.tx) as f64 / duration
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,8 +86,8 @@ impl NetworkSpeedWidget {
|
||||
pub fn new(interface: &str, num_samples: usize) -> Self {
|
||||
let last_stat = TransferStat::read_stat(interface).unwrap();
|
||||
let interface = interface.to_string();
|
||||
let rx_history: VecDeque<f32> = (0..num_samples).map(|_| 0.).collect();
|
||||
let tx_history: VecDeque<f32> = (0..num_samples).map(|_| 0.).collect();
|
||||
let rx_history: VecDeque<f32> = (0..num_samples).map(|_| 1.).collect();
|
||||
let tx_history: VecDeque<f32> = (0..num_samples).map(|_| 1.).collect();
|
||||
Self {
|
||||
last_stat,
|
||||
interface,
|
||||
@ -95,12 +96,16 @@ impl NetworkSpeedWidget {
|
||||
}
|
||||
}
|
||||
|
||||
fn is_active(&self) -> bool {
|
||||
(self.rx_history.iter().sum::<f32>() + self.tx_history.iter().sum::<f32>()) > 0.
|
||||
}
|
||||
|
||||
fn format_rate(rate: f64) -> String {
|
||||
if rate.is_nan() {
|
||||
return "N/A".to_string();
|
||||
}
|
||||
|
||||
const UNIT_NAME: [&'static str; 6] = [" B/s", "KB/s", "MB/s", "GB/s", "TB/s", "PB/s"];
|
||||
const UNIT_NAME: [&str; 6] = [" B/s", "KB/s", "MB/s", "GB/s", "TB/s", "PB/s"];
|
||||
|
||||
let mut best_unit = UNIT_NAME[0];
|
||||
let mut best_multiplier = 1.0;
|
||||
@ -113,9 +118,7 @@ impl NetworkSpeedWidget {
|
||||
best_multiplier *= 1024.0
|
||||
}
|
||||
|
||||
let ret = format!("{:6.1}{}", rate / best_multiplier, best_unit);
|
||||
|
||||
return ret;
|
||||
format!("{:6.1}{}", rate / best_multiplier, best_unit)
|
||||
}
|
||||
|
||||
fn get_human_readable_stat(&mut self) -> Result<(String, String)> {
|
||||
@ -130,14 +133,11 @@ impl NetworkSpeedWidget {
|
||||
self.tx_history.pop_front();
|
||||
self.last_stat = cur_stat;
|
||||
|
||||
return Ok((Self::format_rate(rx_rate), Self::format_rate(tx_rate)));
|
||||
Ok((Self::format_rate(rx_rate), Self::format_rate(tx_rate)))
|
||||
}
|
||||
}
|
||||
|
||||
impl Widget for NetworkSpeedWidget {
|
||||
fn update(&mut self) -> Option<WidgetUpdate> {
|
||||
fn render(&mut self) -> Option<String> {
|
||||
if let Ok((rx, tx)) = self.get_human_readable_stat() {
|
||||
let mut data = Block::new();
|
||||
let (rx_history, tx_history) = if self.rx_history.len() > 1 {
|
||||
let g = spark::Graph {
|
||||
min: None,
|
||||
@ -150,11 +150,21 @@ impl Widget for NetworkSpeedWidget {
|
||||
} else {
|
||||
("".to_string(), "".to_string())
|
||||
};
|
||||
data.use_pango();
|
||||
data.append_full_text(&format!(
|
||||
return Some(format!(
|
||||
"Rx:<tt>{} {}</tt> Tx:<tt>{} {}</tt>",
|
||||
rx, rx_history, tx, tx_history
|
||||
));
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl Widget for NetworkSpeedWidget {
|
||||
fn update(&mut self) -> Option<WidgetUpdate> {
|
||||
if let Some(text) = self.render() {
|
||||
let mut data = Block::new();
|
||||
data.use_pango();
|
||||
data.append_full_text(&text);
|
||||
return Some(WidgetUpdate {
|
||||
refresh_interval: std::time::Duration::new(1, 0),
|
||||
data: Some(data),
|
||||
@ -163,3 +173,56 @@ impl Widget for NetworkSpeedWidget {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AllNetworkSpeedWidget {
|
||||
nics: Vec<NetworkSpeedWidget>,
|
||||
}
|
||||
impl AllNetworkSpeedWidget {
|
||||
pub fn new(num_samples: usize) -> Self {
|
||||
let dev_pat = Regex::new("(enp|eno).*").expect("bad re");
|
||||
let nics = std::fs::read_dir(NETWORK_PATH_PREFIX)
|
||||
.expect(&format!("couldn't list {NETWORK_PATH_PREFIX}"))
|
||||
.filter_map(|dir| {
|
||||
let d = dir.unwrap();
|
||||
let p = d.file_name();
|
||||
let p = p.to_string_lossy();
|
||||
if dev_pat.is_match(&p) {
|
||||
Some(NetworkSpeedWidget::new(&p, num_samples))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
AllNetworkSpeedWidget { nics }
|
||||
}
|
||||
}
|
||||
|
||||
impl Widget for AllNetworkSpeedWidget {
|
||||
fn update(&mut self) -> Option<WidgetUpdate> {
|
||||
let nics: Vec<_> = self
|
||||
.nics
|
||||
.iter_mut()
|
||||
.filter_map(|nic| {
|
||||
if !nic.is_active() {
|
||||
return None;
|
||||
}
|
||||
if let Some(text) = nic.render() {
|
||||
Some(format!("{}: {}", nic.interface, text))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
let mut data = Block::new();
|
||||
data.use_pango();
|
||||
nics.iter().for_each(|n| {
|
||||
data.append_full_text(n);
|
||||
});
|
||||
Some(WidgetUpdate {
|
||||
refresh_interval: std::time::Duration::new(1, 0),
|
||||
data: Some(data),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
127
src/widgets/power.rs
Normal file
127
src/widgets/power.rs
Normal file
@ -0,0 +1,127 @@
|
||||
//! ::::::::::::::
|
||||
//! /sys/class/power_supply/hidpp_battery_8/uevent
|
||||
//! ::::::::::::::
|
||||
//! POWER_SUPPLY_NAME=hidpp_battery_8
|
||||
//! POWER_SUPPLY_TYPE=Battery
|
||||
//! POWER_SUPPLY_ONLINE=1
|
||||
//! POWER_SUPPLY_STATUS=Discharging
|
||||
//! POWER_SUPPLY_SCOPE=Device
|
||||
//! POWER_SUPPLY_MODEL_NAME=M570
|
||||
//! POWER_SUPPLY_MANUFACTURER=Logitech
|
||||
//! POWER_SUPPLY_SERIAL_NUMBER=1028-26-d9-b5-38
|
||||
//! POWER_SUPPLY_CAPACITY=65
|
||||
use std::collections::HashMap;
|
||||
|
||||
use glob::glob;
|
||||
use i3monkit::{Block, ColorRGB, Widget, WidgetUpdate};
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::colors;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct PowerSupply {}
|
||||
|
||||
const POWER_SUPPLY_GLOB: &str = "/sys/class/power_supply/*/uevent";
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
enum PowerSupplyError {
|
||||
#[error("IO error {0}")]
|
||||
IoError(#[from] std::io::Error),
|
||||
#[error("glob error {0}")]
|
||||
GlobError(#[from] glob::GlobError),
|
||||
#[error("pattern error {0}")]
|
||||
PatternError(#[from] glob::PatternError),
|
||||
#[error("UTF-8 error {0}")]
|
||||
Utf8Error(#[from] std::str::Utf8Error),
|
||||
#[error("parse number error {0}")]
|
||||
ParseIntErro(#[from] std::num::ParseIntError),
|
||||
#[error("parse error {0}")]
|
||||
ParseError(String),
|
||||
}
|
||||
|
||||
impl PowerSupply {
|
||||
fn get_update(&mut self) -> Result<Vec<String>, PowerSupplyError> {
|
||||
const BATT_100: &str = "";
|
||||
const BATT_75: &str = "";
|
||||
const BATT_50: &str = "";
|
||||
const BATT_25: &str = "";
|
||||
const BATT_0: &str = "";
|
||||
|
||||
let mut res = Vec::new();
|
||||
for ps in glob(POWER_SUPPLY_GLOB)? {
|
||||
let bytes = std::fs::read(&ps?)?;
|
||||
let values: HashMap<&str, &str> = std::str::from_utf8(&bytes)?
|
||||
.lines()
|
||||
.map(|l| {
|
||||
l.split_once('=').ok_or_else(|| {
|
||||
PowerSupplyError::ParseError("missing = in uevent line".to_string())
|
||||
})
|
||||
})
|
||||
.collect::<Result<_, _>>()?;
|
||||
// Skip things that aren't battery powered
|
||||
if !values
|
||||
.get("POWER_SUPPLY_TYPE")
|
||||
.map(|t| t == &"Battery")
|
||||
.unwrap_or(false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
let cap: u32 = values
|
||||
.get("POWER_SUPPLY_CAPACITY")
|
||||
.unwrap_or(&"0")
|
||||
.parse()?;
|
||||
let power = if cap >= 90 {
|
||||
BATT_100
|
||||
} else if cap >= 70 {
|
||||
BATT_75
|
||||
} else if cap >= 40 {
|
||||
BATT_50
|
||||
} else if cap >= 20 {
|
||||
BATT_25
|
||||
} else {
|
||||
BATT_0
|
||||
};
|
||||
|
||||
let color = if cap >= 50 {
|
||||
colors::WHITE
|
||||
} else if cap >= 25 {
|
||||
ColorRGB::yellow()
|
||||
} else {
|
||||
ColorRGB::red()
|
||||
};
|
||||
res.push(format!(
|
||||
r##"{} {}: {}% <span color="{}" face="pango:Font Awesome 5 Free">{}</span>"##,
|
||||
values
|
||||
.get("POWER_SUPPLY_MANUFACTURER")
|
||||
.unwrap_or(&"Unknown mfg"),
|
||||
values
|
||||
.get("POWER_SUPPLY_MODEL_NAME")
|
||||
.unwrap_or(&"Unknown model"),
|
||||
cap,
|
||||
colors::to_string(color),
|
||||
power,
|
||||
));
|
||||
}
|
||||
Ok(res)
|
||||
}
|
||||
}
|
||||
|
||||
impl Widget for PowerSupply {
|
||||
fn update(&mut self) -> Option<WidgetUpdate> {
|
||||
match self.get_update() {
|
||||
Ok(statuses) => {
|
||||
let mut data = Block::new();
|
||||
data.use_pango();
|
||||
for status in statuses {
|
||||
data.append_full_text(&status);
|
||||
}
|
||||
return Some(WidgetUpdate {
|
||||
refresh_interval: std::time::Duration::new(60, 0),
|
||||
data: Some(data),
|
||||
});
|
||||
}
|
||||
Err(err) => eprintln!("Failed to update: {}", err),
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user