#!/bin/bash [ -f /sys/class/power_supply/BAT0/type ] || exit 1 type=$(