Skip to content

Commit 8afebcd

Browse files
committed
Reorder sections in manpage: usage before config
1 parent b39e0e8 commit 8afebcd

File tree

2 files changed

+68
-65
lines changed

2 files changed

+68
-65
lines changed

doc/xob.1

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,50 @@ By default: see below.
5050
\f[B]-q\f[R]
5151
Specifies whether to suppress all normal output.
5252
By default: not suppressed
53+
.SH USAGE
54+
.SS GENERAL CASE
55+
.PP
56+
Use a program that listens to events (such as a change in audio volume
57+
levels) and issues new values on the standard output automatically.
58+
Launch \f[C]the_listener_program | xob\f[R].
59+
Ready to use input programs for audio volume and screen backlight are
60+
available on the xob project homepage: https://github.com/florentc/xob
61+
.SS FALLBACK METHOD
62+
.PP
63+
In case no input program fits your needs, you may trigger changes
64+
manually.
65+
Append new values in a named pipe (a pipe that persists as a special
66+
file on the filesystem) and have xob consume them as they arrive.
67+
.PP
68+
Create a named pipe, e.g.\ \f[I]/tmp/xobpipe\f[R], on your filesystem.
69+
.IP
70+
.nf
71+
\f[C]
72+
mkfifo /tmp/xobpipe
73+
\f[R]
74+
.fi
75+
.PP
76+
Have xob consume new values as they arrive on the pipe.
77+
.IP
78+
.nf
79+
\f[C]
80+
tail -f /tmp/xobpipe | xob
81+
\f[R]
82+
.fi
83+
.PP
84+
Write values to the pipe when you deem it relevant.
85+
In the classic audio volume bar example, that would be after the user
86+
has pressed a button and you changed the volume (usually set up as a
87+
keybinding in your window manager or desktop environment).
88+
.IP
89+
.nf
90+
\f[C]
91+
command_that_outputs_a_value >> /tmp/xobpipe
92+
\f[R]
93+
.fi
94+
.PP
95+
To try it manually, issue a test value such as
96+
\f[C]echo 43 >> /tmp/xobpipe\f[R].
5397
.SH CONFIGURATION FILE
5498
.PP
5599
The configuration file only specifies styles (appearances) for the bar.
@@ -293,49 +337,6 @@ default = {
293337
};
294338
\f[R]
295339
.fi
296-
.SH GENERAL USE CASE
297-
.PP
298-
Use a program that listens to events (such as a change in audio volume
299-
levels) and issues new values on the standard output automatically.
300-
Launch \f[C]the_listener_program | xob\f[R].
301-
Ready to use input programs for audio volume and screen backlight are
302-
available on the xob project homepage: https://github.com/florentc/xob
303-
.SS FALLBACK METHOD
304-
.PP
305-
In case no input program fits your needs, you may trigger changes
306-
manually.
307-
Append new values in a named pipe (a pipe that persists as a special
308-
file on the filesystem) and have xob consume them as they arrive.
309-
.PP
310-
Create a named pipe, e.g.\ \f[I]/tmp/xobpipe\f[R], on your filesystem.
311-
.IP
312-
.nf
313-
\f[C]
314-
mkfifo /tmp/xobpipe
315-
\f[R]
316-
.fi
317-
.PP
318-
Have xob consume new values as they arrive on the pipe.
319-
.IP
320-
.nf
321-
\f[C]
322-
tail -f /tmp/xobpipe | xob
323-
\f[R]
324-
.fi
325-
.PP
326-
Write values to the pipe when you deem it relevant.
327-
In the classic audio volume bar example, that would be after the user
328-
has pressed a button and you changed the volume (usually set up as a
329-
keybinding in your window manager or desktop environment).
330-
.IP
331-
.nf
332-
\f[C]
333-
command_that_outputs_a_value >> /tmp/xobpipe
334-
\f[R]
335-
.fi
336-
.PP
337-
To try it manually, issue a test value such as
338-
\f[C]echo 43 >> /tmp/xobpipe\f[R].
339340
.SH FAQ
340341
.RS
341342
.PP

doc/xob.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,30 @@ xob - A lightweight overlay volume/backlight/progress/anything bar for the X Win
3131
**-q**
3232
: Specifies whether to suppress all normal output. By default: not suppressed
3333

34+
# USAGE
35+
36+
## GENERAL CASE
37+
38+
Use a program that listens to events (such as a change in audio volume levels) and issues new values on the standard output automatically. Launch `the_listener_program | xob`. Ready to use input programs for audio volume and screen backlight are available on the xob project homepage: https://github.com/florentc/xob
39+
40+
## FALLBACK METHOD
41+
42+
In case no input program fits your needs, you may trigger changes manually. Append new values in a named pipe (a pipe that persists as a special file on the filesystem) and have xob consume them as they arrive.
43+
44+
Create a named pipe, e.g. */tmp/xobpipe*, on your filesystem.
45+
46+
mkfifo /tmp/xobpipe
47+
48+
Have xob consume new values as they arrive on the pipe.
49+
50+
tail -f /tmp/xobpipe | xob
51+
52+
Write values to the pipe when you deem it relevant. In the classic audio volume bar example, that would be after the user has pressed a button and you changed the volume (usually set up as a keybinding in your window manager or desktop environment).
53+
54+
command_that_outputs_a_value >> /tmp/xobpipe
55+
56+
To try it manually, issue a test value such as `echo 43 >> /tmp/xobpipe`.
57+
3458
# CONFIGURATION FILE
3559

3660
The configuration file only specifies styles (appearances) for the bar. The maximum value and timeout are set by **-m** and **-t**. When starting, xob looks for the configuration file in the following order:
@@ -205,28 +229,6 @@ This example configuration file provides two styles "volume" and "backlight". In
205229
};
206230
};
207231

208-
# GENERAL USE CASE
209-
210-
Use a program that listens to events (such as a change in audio volume levels) and issues new values on the standard output automatically. Launch `the_listener_program | xob`. Ready to use input programs for audio volume and screen backlight are available on the xob project homepage: https://github.com/florentc/xob
211-
212-
## FALLBACK METHOD
213-
214-
In case no input program fits your needs, you may trigger changes manually. Append new values in a named pipe (a pipe that persists as a special file on the filesystem) and have xob consume them as they arrive.
215-
216-
Create a named pipe, e.g. */tmp/xobpipe*, on your filesystem.
217-
218-
mkfifo /tmp/xobpipe
219-
220-
Have xob consume new values as they arrive on the pipe.
221-
222-
tail -f /tmp/xobpipe | xob
223-
224-
Write values to the pipe when you deem it relevant. In the classic audio volume bar example, that would be after the user has pressed a button and you changed the volume (usually set up as a keybinding in your window manager or desktop environment).
225-
226-
command_that_outputs_a_value >> /tmp/xobpipe
227-
228-
To try it manually, issue a test value such as `echo 43 >> /tmp/xobpipe`.
229-
230232
# FAQ
231233

232234
> "How should I display different sources of information (e.g. volume and brightness)?"

0 commit comments

Comments
 (0)