added support for termux-battery-status
This commit is contained in:
parent
d6f0f647dd
commit
22904852bc
1 changed files with 24 additions and 15 deletions
|
@ -270,6 +270,14 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
||||||
# EOF
|
# EOF
|
||||||
# ;;
|
# ;;
|
||||||
# *Linux*)
|
# *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
|
# while IFS= read -r batpath; do
|
||||||
# grep -i -q device "$batpath/scope" 2> /dev/null && continue
|
# 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
|
# done << EOF
|
||||||
# $(find /sys/class/power_supply -maxdepth 1 -iname '*bat*')
|
# $(find /sys/class/power_supply -maxdepth 1 -iname '*bat*')
|
||||||
# EOF
|
# EOF
|
||||||
|
# fi
|
||||||
# ;;
|
# ;;
|
||||||
# *CYGWIN*|*MSYS*|*MINGW*)
|
# *CYGWIN*|*MSYS*|*MINGW*)
|
||||||
# while IFS= read -r line; do
|
# while IFS= read -r line; do
|
||||||
|
|
Loading…
Reference in a new issue