mirror of
1
0
Fork 0
This commit is contained in:
jmox 2020-05-26 20:29:53 +02:00 committed by GitHub
commit 3e59cfa6db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 15 deletions

View File

@ -270,6 +270,14 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# EOF
# ;;
# *Linux*)
# if type "termux-battery-status" >/dev/null 2>&1; then
# if [ x"$discharging" != x"true" ]; then
# discharging=$(termux-battery-status | jq -r '.status' | grep -qi "DISCHARGING" && echo "true" || echo "false")
# fi
# percentage=$(termux-battery-status | jq -r '.percentage')
# charge=$(awk -v charge="$charge" -v percentage="${percentage%%%}" 'BEGIN { print charge + percentage / 100 }')
# count=$((count + 1))
# else
# while IFS= read -r batpath; do
# grep -i -q device "$batpath/scope" 2> /dev/null && continue
#
@ -290,6 +298,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# done << EOF
# $(find /sys/class/power_supply -maxdepth 1 -iname '*bat*')
# EOF
# fi
# ;;
# *CYGWIN*|*MSYS*|*MINGW*)
# while IFS= read -r line; do