blob: 5e77abb6abb3d17e2fd032a84854591fa08bcd17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
update() {
id=$1
setup_trap "${id}.*"
while true; do
acpi -t | sed -r \
-e 's/^([A-Z])[a-z]+ ([0-9]+):/\1\2:/' \
-e 's/\s*degrees\s*/°/g' |
cat -n | while read -r n line; do
printf "label %s\n" "$line" | write "${id}.${n}"
done
sleep 1
done
}
. "$(dirname "$0")/rbar.sh"
|