1
0
Fork 0
mirror of synced 2024-12-22 06:41:07 -05:00

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

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 }')