Commit 726ffbb1 authored by Dylan Araps's avatar Dylan Araps

Merge pull request #104 from dylanaraps/battery_fix

Fix the battery check on PCs without a battery.
parents d826f6e1 376614b9
......@@ -1346,7 +1346,7 @@ getdisk () {
getbattery () {
case "$os" in
"Linux")
if [ -d "/sys/class/power_supply" ]; then
if [ "$(ls /sys/class/power_supply/)" ]; then
# Set the index to the battery number.
case "$battery_num" in
"all") battery_num="*" index=0 ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment