1 2 3
#!/bin/sh cat /sys/class/power_supply/BAT*/capacity | xargs -n1 test 5 -ge && echo $1 >/sys/class/leds/input3::capslock/brightness