mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
Wire up scdoc and rewrite sway(1)
This commit is contained in:
parent
3e1bf721c6
commit
c2a7d367af
25
meson.build
25
meson.build
|
@ -40,7 +40,6 @@ libpam = cc.find_library('pam')
|
|||
math = cc.find_library('m')
|
||||
rt = cc.find_library('rt')
|
||||
git = find_program('git', required: false)
|
||||
a2x = find_program('a2x', required: false)
|
||||
|
||||
conf_data = configuration_data()
|
||||
|
||||
|
@ -48,31 +47,25 @@ if gdk_pixbuf.found()
|
|||
conf_data.set('HAVE_GDK_PIXBUF', true)
|
||||
endif
|
||||
|
||||
if a2x.found()
|
||||
scdoc = find_program('scdoc', required: false)
|
||||
|
||||
if scdoc.found()
|
||||
sh = find_program('sh')
|
||||
mandir = get_option('mandir')
|
||||
man_files = [
|
||||
'sway/sway.1.txt',
|
||||
'sway/sway.5.txt',
|
||||
'sway/sway-bar.5.txt',
|
||||
'sway/sway-input.5.txt',
|
||||
'sway/sway-security.7.txt',
|
||||
'swaymsg/swaymsg.1.txt',
|
||||
'sway/sway.1.scd',
|
||||
]
|
||||
foreach filename : man_files
|
||||
topic = filename.split('.')[-3].split('/')[-1]
|
||||
section = filename.split('.')[-2]
|
||||
output = '@0@.@1@'.format(topic, section)
|
||||
|
||||
custom_target(
|
||||
'man-@0@-@1@'.format(topic, section),
|
||||
output,
|
||||
input: filename,
|
||||
output: '@BASENAME@',
|
||||
output: output,
|
||||
command: [
|
||||
a2x,
|
||||
'--no-xmllint',
|
||||
'--doctype', 'manpage',
|
||||
'--format', 'manpage',
|
||||
'--destination-dir', meson.current_build_dir(),
|
||||
'@INPUT@'
|
||||
sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc.path(), output)
|
||||
],
|
||||
install: true,
|
||||
install_dir: '@0@/man@1@'.format(mandir, section)
|
||||
|
|
95
sway/sway.1.scd
Normal file
95
sway/sway.1.scd
Normal file
|
@ -0,0 +1,95 @@
|
|||
sway(1)
|
||||
|
||||
# NAME
|
||||
|
||||
sway - SirCmpwn's Wayland window manager
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
*sway* [options...] [command]
|
||||
|
||||
# OPTIONS
|
||||
|
||||
*-h, --help*
|
||||
Show help message and quit.
|
||||
|
||||
*-c, --config* <config>
|
||||
Specifies a config file.
|
||||
|
||||
*-C, --validate*
|
||||
Check the validity of the config file, then exit.
|
||||
|
||||
*-d, --debug*
|
||||
Enables full logging, including debug information.
|
||||
|
||||
*-v, --version*
|
||||
Show the version number and quit.
|
||||
|
||||
*-V, --verbose*
|
||||
Enables more verbose logging.
|
||||
|
||||
*--get-socketpath*
|
||||
Gets the IPC socket path and prints it, then exits.
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
sway was created to fill the need of an i3-like window manager for Wayland. The
|
||||
upstream i3 developers have no intention of porting i3 to Wayland, and projects
|
||||
proposed by others ended up as vaporware. Many thanks to the i3 folks for
|
||||
providing such a great piece of software, so good that your users would rather
|
||||
write an entirely new window manager from scratch that behaved _exactly_ like i3
|
||||
rather than switch to something else.
|
||||
|
||||
You can run sway directly from a tty, or via a Wayland-compatible login manager.
|
||||
|
||||
# CONFIGURATION
|
||||
|
||||
sway searches for a config file in the following locations, in this order:
|
||||
|
||||
- ~/.sway/config
|
||||
- $XDG\_CONFIG\_HOME/sway/config (suggested location)
|
||||
- ~/.i3/config
|
||||
- $XDG\_CONFIG\_HOME/i3/config
|
||||
- /etc/sway/config
|
||||
- /etc/i3/config
|
||||
|
||||
If unset, $XDG\_CONFIG\_HOME defalts to *~/.config*.
|
||||
|
||||
An error is raised when no config file is found. The recommended default
|
||||
configuration is usually installed to */etc/sway/config*; you are encouraged to
|
||||
copy this to *~/.config/sway/config* and edit it from there.
|
||||
|
||||
For information on the config file format, see *sway*(5).
|
||||
|
||||
# IPC COMMANDS
|
||||
|
||||
Though *swaymsg*(1) is generally preferred, you may run *sway* _command_ to
|
||||
send _command_ to the running instance of sway. You can also issue commands
|
||||
with *i3-msg*(1) or even with *i3*(1).
|
||||
|
||||
# ENVIRONMENT
|
||||
|
||||
The following environment variables have an effect on sway:
|
||||
|
||||
_SWAY\_CURSOR\_THEME_
|
||||
Specifies the name of the cursor theme to use.
|
||||
|
||||
_SWAY\_CURSOR\_SIZE_
|
||||
Specifies the size of the cursor to use.
|
||||
|
||||
_SWAYSOCK_
|
||||
Specifies the path to the sway IPC socket.
|
||||
|
||||
_XKB\_DEFAULT\_RULES_, _XKB\_DEFAULT\_MODEL_, _XKB\_DEFAULT\_LAYOUT_,
|
||||
_XKB\_DEFAULT\_VARIANT_, _XKB\_DEFAULT\_OPTIONS_
|
||||
Configures the xkb keyboard settings. See *xkeyboard-config*(7).
|
||||
|
||||
# AUTHORS
|
||||
|
||||
Maintained by Drew DeVault <sir@cmpwn.com>, who is assisted by other open
|
||||
source contributors. For more information about sway development, see
|
||||
<https://github.com/swaywm/sway>.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
*sway*(5) *swaymsg*(1) *swaygrab*(1) *sway-input*(5) *sway-bar*(5)
|
Loading…
Reference in a new issue