diff options
-rw-r--r-- | etc/functions/check_ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/functions/check_ac b/etc/functions/check_ac index 429ed3f..d97d7da 100644 --- a/etc/functions/check_ac +++ b/etc/functions/check_ac @@ -2,7 +2,7 @@ ## check_ac - returns true if machine is running on AC typeset file=/sys/class/power_supply/AC/online if [[ -f $file ]] { - [[ $(cat /sys/class/power_supply/AC/online) == 1 ]] + [[ $(cat $file) == 1 ]] return $? } return 0 |