ON_AC_POWER(1)
โจ ON_AC_POWER(1) โ on_ac_power ๐ โจ
๐ NAME
on_ac_power - test whether computer is running on AC power
๐ SYNOPSIS
on_ac_power
๐ฆ DESCRIPTION
okay so on_ac_power is literally the vibe check for your power supply ๐โจ It checks whether the system is running on abundant power (like AC mains, a USB charger, etc.) instead of battery power. no cap, it's giving plugged-in energy ๐๐
๐ธ OPTIONS
None. ๐ it really doesn't need any, it's already iconic as-is ๐
๐ง EXIT STATUS
0(true) โ System is on mains power โก plugged in and thriving ๐1(false) โ System is not on mains power ๐ running on battery, bestie255(false) โ Power status could not be determined ๐ the system just shrugged
๐ CAVEATS
โ ๏ธ okay listen bestie, most desktops and servers have no power sensors, so they return255"unknown" ๐ญ for most purposes you'd want to treat this answer as implying mains power ๐ โ just note that255evaluates as false for the shell, so don't let that trip you up ๐
ngl this one's lowkey important: the program currently provides only information known to the kernel ๐ง it doesn't (yet?) query userspace daemons such as nut which may provide further information ๐
๐ซถ AUTHOR
This manual page was written by Steve Dodd <steved@loth.demon.co.uk>, was updated by Thomas Hood then by Adam Borowski. ๐ all the legends who made this page slay โจ
๐ ok that's the tea, bestie! manual page from 12 March 2018 โ ON_AC_POWER(1) โ stay plugged in and stay iconic ๐๐ โจ
๐ฆ where this page comes from
- debian bookworm: powermgmt-base 1.37 ยท GPL-2.0-or-later
- debian trixie: powermgmt-base 1.38 ยท GPL-2.0-or-later
- ubuntu jammy: powermgmt-base 1.36 ยท GPL-2.0-or-later
- ubuntu jammy: powermgmt-base 1.36ubuntu0.22.04.1 ยท GPL-2.0-or-later
- ubuntu noble: powermgmt-base 1.37 ยท GPL-2.0-or-later
- ubuntu noble: powermgmt-base 1.37ubuntu0.1 ยท GPL-2.0-or-later
- ubuntu questing: powermgmt-base 1.38ubuntu1 ยท GPL-2.0-or-later
- ubuntu resolute: powermgmt-base 1.38ubuntu2 ยท GPL-2.0-or-later
- ubuntu stonking: powermgmt-base 1.39ubuntu1 ยท GPL-2.0-or-later
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms