| 1 |
'\" t |
| 2 |
.TH "SYSTEMD\-AC\-POWER" "1" "" "systemd 261~rc3" "systemd-ac-power" |
| 3 |
.\" ----------------------------------------------------------------- |
| 4 |
.\" * Define some portability stuff |
| 5 |
.\" ----------------------------------------------------------------- |
| 6 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
.\" http://bugs.debian.org/507673 |
| 8 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
.ie \n(.g .ds Aq \(aq |
| 11 |
.el .ds Aq ' |
| 12 |
.\" ----------------------------------------------------------------- |
| 13 |
.\" * set default formatting |
| 14 |
.\" ----------------------------------------------------------------- |
| 15 |
.\" disable hyphenation |
| 16 |
.nh |
| 17 |
.\" disable justification (adjust text to left margin only) |
| 18 |
.ad l |
| 19 |
.\" ----------------------------------------------------------------- |
| 20 |
.\" * MAIN CONTENT STARTS HERE * |
| 21 |
.\" ----------------------------------------------------------------- |
| 22 |
.SH "NAME" |
| 23 |
systemd-ac-power \- Report whether we are connected to an external power source |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.HP \w'\fBsystemd\-ac\-power\fR\ 'u |
| 26 |
\fBsystemd\-ac\-power\fR [OPTIONS...] |
| 27 |
.SH "DESCRIPTION" |
| 28 |
.PP |
| 29 |
\fBsystemd\-ac\-power\fR |
| 30 |
may be used to check whether the system is running on AC power or not\&. By default, it will simply return success (if we can detect that we are running on AC power) or failure, with no output\&. This can be useful for example to debug |
| 31 |
\fIConditionACPower=\fR |
| 32 |
(see |
| 33 |
\fBsystemd.unit\fR(5))\&. |
| 34 |
.SH "OPTIONS" |
| 35 |
.PP |
| 36 |
The following options are understood: |
| 37 |
.PP |
| 38 |
\fB\-v\fR, \fB\-\-verbose\fR |
| 39 |
.RS 4 |
| 40 |
Show result as text instead of just returning success or failure\&. |
| 41 |
.sp |
| 42 |
Added in version 253\&. |
| 43 |
.RE |
| 44 |
.PP |
| 45 |
\fB\-\-low\fR |
| 46 |
.RS 4 |
| 47 |
Instead of showing AC power state, show low battery state\&. In this case, will return zero if all batteries are currently discharging and below 5% of maximum charge\&. Returns non\-zero otherwise\&. |
| 48 |
.sp |
| 49 |
Added in version 254\&. |
| 50 |
.RE |
| 51 |
.PP |
| 52 |
\fB\-h\fR, \fB\-\-help\fR |
| 53 |
.RS 4 |
| 54 |
Print a short help text and exit\&. |
| 55 |
.RE |
| 56 |
.PP |
| 57 |
\fB\-\-version\fR |
| 58 |
.RS 4 |
| 59 |
Print a short version string and exit\&. |
| 60 |
.RE |
| 61 |
.SH "EXIT STATUS" |
| 62 |
.PP |
| 63 |
On success (running on AC power), 0 is returned, a non\-zero failure code otherwise\&. |
| 64 |
.SH "SEE ALSO" |
| 65 |
.PP |
| 66 |
\fBsystemd\fR(1) |