-
Notifications
You must be signed in to change notification settings - Fork 21
/
batsignal.1.in
143 lines (143 loc) · 4.19 KB
/
batsignal.1.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
.TH PROGUPPER 1 PROGNAME\-VERSION
.SH NAME
PROGNAME \- battery monitor daemon
.SH SYNOPSIS
.B PROGNAME
.RB [ OPTIONS ]
.SH DESCRIPTION
PROGNAME is a lightweight battery daemon written in C that notifies the user about battery states.
It is intended for minimal window managers, but can be used in any environment that supports desktop notifications via libnotify.
.SH OPTIONS
.TP
.B \-h
Display help
.TP
.B \-v
Display version information
.TP
.B \-b
Run PROGNAME as background daemon
.TP
.B \-o
Check battery once and exit
.TP
.B \-i
Ignore missing battery errors
.TP
.B \-e
Cause notifications to expire
.TP
.B \-N
Disable desktop notifications
.TP
.B \-w LEVEL
Battery warning LEVEL (default 15). 0 disables this level
.TP
.B \-c LEVEL
Critical battery LEVEL (default 5). 0 disables this level
.TP
.B \-d LEVEL
Battery danger LEVEL (default 2). 0 disables this level
.TP
.B \-f LEVEL
Battery full LEVEL (default 0). 0 disables this level
.TP
.B \-p
Show a message when the battery begins charging or discharging
.TP
.B \-W MESSAGE
Show MESSAGE when battery is at warning level
.TP
.B \-C MESSAGE
Show MESSAGE when battery is at critical level
.TP
.B \-D COMMAND
Run COMMAND when battery is at danger level
.TP
.B \-F MESSAGE
Show MESSAGE when battery is at full level
.TP
.B \-P MESSAGE
Show MESSAGE when battery is charging, if -p option is set
.TP
.B \-U MESSAGE
Show MESSAGE when battery is discharging, if -p option is set
.TP
.B \-M COMMAND
Send each message using COMMAND
.TP
.B \-n NAME
Battery device NAME - multiple batteries may be separated by commas (default BAT0)
.TP
.B \-m SECONDS
Minimum number of SECONDS (default 60) to wait between battery checks.
Settings SECONDS to 0 disables polling and waits for the USR1 signal before checking battery level.
Prefixing SECONDS with a + (ex: -m +10) will force a check at SECONDS intervals, regardless of battery level.
.TP
.B \-a APP_NAME
App name used in notifications (default: PROGNAME)
.TP
.B \-I ICON
Display specified ICON in notifications
.SH CONFIGURATION
Options can be passed to PROGNAME as command arguments or placed in a configuration file.
Options from the configuration file will be applied first and then may be overridden by command line as arguments.
.P
The configuration file should include option arguments as documented above, one argument per line.
Lines beginning with # and empty lines are ignored.
For example, to specify a warning level of 30 and run as a background daemon, the following configuration file could be used:
.RS
.P
# Run in background
.br
-b
.br
# Use warning level of 30
.br
-w
.br
30
.RE
.P
The following paths are checked in sequence for a configuration file:
.IP \[bu]
.B PROGUPPER_CONFIG
environment variable (if present)
.IP \[bu]
$HOME/.config/PROGNAME (or the config base specificed in XDG_CONFIG_HOME)
.IP \[bu]
$HOME/.PROGNAME
.IP \[bu]
/usr/local/etc/PROGNAME
.IP \[bu]
/etc/PROGNAME
.SH ENVIRONMENT
.TP
.B PROGUPPER_CONFIG
Sets the option configuration file path.
.TP
.B XDG_CONFIG_HOME
The base path for the XDG config directory. Used in the option file search.
.SH SIGNALS
PROGNAME responds to the following signals:
.TP
.B SIGUSR1
Sending the process SIGUSR1 will cause an immediate battery check to be performed.
.SH NOTES
In most cases, PROGNAME will perform fewer battery state checks while the battery is discharging and the level of charge is not near a warning level.
This frequency is affected by the multiplier (-m) option and is never less than <multiplier> seconds.
If the "full" level (-f) is set or charge/discharge messages are enabled (-p), PROGNAME will instead check the battery state every <multiplier> seconds regardless of level of charge.
.P
If the "full" level (-f) is set, the battery full notification will be triggered at the given level of charge or when the battery status changes to full, whichever occurs first.
.P
The message COMMAND passed with -M is a C printf-style format string.
It can use two string placeholders (%s) that will be replaced by the message text and the current battery level.
Be sure to test the command - invalid format strings may cause PROGNAME to crash.
.br
Ex: -M "wall 'Battery warning: %s - Level is %s'"
.SH COPYRIGHT
Copyright 2018-2024 Corey Hinshaw
.br
Copyright 2016-2017 Aaron Marcher
.br
License: ISC License