mirror of
1
0
Fork 0

added FreeBSD support to _battery_info(), resolves #680

This commit is contained in:
Gregory Pakosz 2023-12-03 21:43:09 +01:00
parent 42adc354b6
commit 78c8d0483d
1 changed files with 5 additions and 0 deletions

View File

@ -358,6 +358,11 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# count=$((count + 1))
# done
# ;;
# *FreeBSD*)
# discharging=$(sysctl -n 'hw.acpi.battery.state' | grep -q 1 && echo "true" || echo "false")
# charge=$(awk -v charge="$(sysctl -n 'hw.acpi.battery.life')" 'BEGIN { print charge / 100 }')
# count=1
# ;;
# esac
# if [ "$count" -ne 0 ]; then
# charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }')