~ecs/dotfiles

e37bb3e208f86929deea446105f264773d00282b — Ember Sawady a month ago 4ed1e68
status: improve reliability
1 files changed, 1 insertions(+), 1 deletions(-)

M bin/status
M bin/status => bin/status +1 -1
@@ 15,7 15,7 @@ while true; do
	bat=""
	if [ $(ls "$bat_dir" | grep '\(BAT\)\|\(bq27200-0\)' | wc -l) -ne 0 ]; then
		bat_dir="$bat_dir/$(ls "$bat_dir" | grep '\(BAT\)\|\(bq27200-0\)' | head -n1)"
		bat=" $(cat "$bat_dir/capacity")"
		bat=" $(cat "$bat_dir/capacity" 2>/dev/null || printf "???")"
		[ "$(cat "$bat_dir/status")" = "Charging" ] && bat="$bat+"
		[ "$(cat "$bat_dir/status")" = "Discharging" ] && bat="$bat-"
	fi