From 78c8d0483db770367e0b3cab9836c898770a5aa7 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Sun, 3 Dec 2023 21:43:09 +0100 Subject: [PATCH] added FreeBSD support to _battery_info(), resolves #680 --- .tmux.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.tmux.conf b/.tmux.conf index a614439..921d5fc 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -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 }')