summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-04-23 21:22:34 (EDT)
committer P. J. McDermott <pj@pehjota.net>2018-04-23 21:22:34 (EDT)
commite6e654e4f65151722da98a3e6ae77338c1fb5fde (patch)
tree1fa4d78f23ae35c12531c8f81ee502dea7f15896 /bin
parent61b54f5b467d1906eb4b4630941aaf8e65c95b3a (diff)
downloadfluxbox-e6e654e4f65151722da98a3e6ae77338c1fb5fde.zip
fluxbox-e6e654e4f65151722da98a3e6ae77338c1fb5fde.tar.gz
fluxbox-e6e654e4f65151722da98a3e6ae77338c1fb5fde.tar.bz2
bin/batmon: Remove
logi1 is a workstation with no battery.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/batmon44
1 files changed, 0 insertions, 44 deletions
diff --git a/bin/batmon b/bin/batmon
deleted file mode 100755
index fec22b7..0000000
--- a/bin/batmon
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-
-bat()
-{
- eval "$(cat /sys/class/power_supply/BAT0/uevent | grep -E \
- '^POWER_SUPPLY_(STATUS|ENERGY_)')"
- percentage=$(printf 'scale = 0; %d * 100 / %d;\n' \
- ${POWER_SUPPLY_ENERGY_NOW} ${POWER_SUPPLY_ENERGY_FULL} | bc)
- case "${POWER_SUPPLY_STATUS}" in
- 'Unknown')
- status='?'
- ;;
- 'Charging')
- status='⚡'
- ;;
- 'Discharging')
- status='🔋'
- ;;
- 'Not charging')
- status='!'
- ;;
- 'Full')
- status='🔌'
- ;;
- esac
- printf '%s%3d%%\n' "${status}" ${percentage}
-}
-
-ac()
-{
- status='🔌'
- printf '%s\n' "${status}"
-}
-
-main()
-{
- if [ -e /sys/class/power_supply/BAT0/uevent ]; then
- bat
- else
- ac
- fi
-}
-
-main "${@}"