No description
pictures | ||
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md |
swaybar_info
About
swaybar_info is a program to be utilized by swaybar that is used by the Sway tiling Wayland compositor.
Usage
# build the "release" build of the program
cargo build --release
# put the "release" build somewhere to be used by swaybar
cp ./target/release/swaybar_info ~/.config/sway/
# Alternatively, get it from crates.io/
cargo install swaybar_info
# The `swaybar_info` binary should be placed in $HOME/.cargo/bin/
Put the following in your ~/.config/sway/config
(assuming the binary is at
$HOME/.config/sway/swaybar_info
):
bar {
position top
# Set --netdev=<device> such that <device> is the network device you
# want to monitor. You can omit --netdev=<device>, but that will also
# cause the program to omit network traffic stats.
status_command $HOME/.config/sway/swaybar_info --netdev=enp7s0
# A "built-in" for "acpi -b" is available, and can be activated with the
# --acpi-builtin flag:
#status_command $HOME/.config/sway/swaybar_info --acpi-builtin
# One can use the "--regex-cmd=<cmd>[SPLIT]<args...>[SPLIT]<regex>" option like so:
#status_command $HOME/.config/sway/swaybar_info --regex-cmd="acpi[SPLIT]-b[SPLIT][0-9]+%.*"
# This example gets battery info into the bar.
# Multiple args should be separated with "[SPLIT]".
# Note that the <args...> portion is optional.
# The following uses 24 hour time
#status_command $HOME/.config/sway/swaybar_info --time-format="%Y-%m-%d %R:%S"
}
Dependencies
Uses serde_json
,
serde
,
chrono
,
and regex
.