doc: include examples and clarify usage

Sometimes people encode logic into files such as Xinitrc which absorbs
command-line arguments that typically control which window manager or
desktop environment to start.

These examples demonstrate how they might do this with sxrc and other
suggestions for reusing ~/.Xinitrc
This commit is contained in:
Earnestly 2019-02-06 18:54:34 +00:00
parent 7073e7df87
commit 41a6a9b372
1 changed files with 24 additions and 3 deletions

27
sx.1
View File

@ -1,4 +1,4 @@
.TH SX 1 "21 October 2018" .TH SX 1 "6 February 2019" 2.1.1
.SH NAME .SH NAME
sx \- start an xorg server sx \- start an xorg server
.SH SYNOPSIS .SH SYNOPSIS
@ -10,10 +10,10 @@ can be used to replace both
.BR xinit (1) .BR xinit (1)
and and
.BR startx (1) .BR startx (1)
for starting an Xorg server. By default for starting an Xorg server with an initial client. By default
.B sx .B sx
will attempt to execute will attempt to execute
.I sxrc .I \%XDG_CONFIG_HOME/sx/sxrc
unless a unless a
.I command .I command
is provided. The is provided. The
@ -70,6 +70,27 @@ This is due to
.B sx .B sx
attempting to run commands from within a subshell and is thusly not considered attempting to run commands from within a subshell and is thusly not considered
a console user. a console user.
.SH EXAMPLES
Use an existing
.I .Xinitrc
by specifying an appropriate interpreter such as
.BR sh (1)
or marking it executable with a correct interpreter line:
.IP
.EX
.B sx sh ~/.Xinitrc
.EE
.PP
Pass arguments to the standard
.I sxrc
by presenting it to
.B sx
as a
.IR command :
.IP
.EX
.B sx ~/.config/sx/sxrc arg1 arg2
.EE
.SH SOURCE .SH SOURCE
.UR https://github.com/Earnestly/sx .UR https://github.com/Earnestly/sx
.UE .UE