1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 22:01:47 +03:00
wezterm/config/Cargo.toml
Wez Furlong e992ac7ad0 lua: add wezterm.battery_info() function
Queries the system battery information and returns an array of
battery information.

Each element is a lua table with the following entries:

* state_of_charge: expressed as percents
* vendor: the battery manufacturer
* model: the battery model
* serial: the battery serial number
* time_to_full: how long until the battery is full
* time_to_empty: how long until the battery is empty
* state: "Charging", "Discharging", "Empty", "Full", "Unknown"

I haven't run this on a system with a battery yet, so I'm holding
off from showing an example until I've got a work one.

refs: https://github.com/wez/wezterm/issues/500
2021-03-06 14:25:36 -08:00

46 lines
1.1 KiB
TOML

[package]
name = "config"
version = "0.1.0"
authors = ["Wez Furlong <wez@wezfurlong.org>"]
edition = "2018"
build = "build.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
vergen = "3"
[dev-dependencies]
pretty_env_logger = "0.4"
[dependencies]
anyhow = "1.0"
battery = "0.7"
bitflags = "1.0"
bstr = "0.2"
chrono = {version="0.4", features=["unstable-locales"]}
dirs-next = "2.0"
filenamegen = "0.2"
hostname = "0.3"
lazy_static = "1.4"
libc = "0.2"
log = "0.4"
luahelper = { path = "../luahelper" }
mlua = {version="0.5", features=["vendored", "lua54", "async", "send"]}
# file change notification
notify = "4.0"
portable-pty = { path = "../pty", features = ["serde_support"]}
promise = { path = "../promise" }
serde = {version="1.0", features = ["rc", "derive"]}
serde_json = "1.0"
smol = "1.2"
terminfo = "0.7"
termwiz = { path = "../termwiz" }
toml = "0.5"
umask = { path = "../umask" }
wezterm-input-types = { path = "../wezterm-input-types" }
wezterm-term = { path = "../term", features=["use_serde"] }
[target."cfg(windows)".dependencies]
winapi = { version = "0.3", features = ["winuser"]}