Skip to content

Instantly share code, notes, and snippets.

@dnmfarrell
Created March 14, 2022 13:41
Show Gist options
  • Save dnmfarrell/4a97c9f82d8333c4425799b9f8b8f41f to your computer and use it in GitHub Desktop.
Save dnmfarrell/4a97c9f82d8333c4425799b9f8b8f41f to your computer and use it in GitHub Desktop.
Is your laptop battery charging?
#!/bin/sh
grep '^Charging$' /sys/class/power_supply/BAT0/status >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment