diff options
-rw-r--r-- | meson.build | 25 | ||||
-rw-r--r-- | sway/sway.1.scd | 95 |
2 files changed, 104 insertions, 16 deletions
diff --git a/meson.build b/meson.build index f59d29b3..d1693ace 100644 --- a/meson.build +++ b/meson.build | |||
@@ -40,7 +40,6 @@ libpam = cc.find_library('pam') | |||
40 | math = cc.find_library('m') | 40 | math = cc.find_library('m') |
41 | rt = cc.find_library('rt') | 41 | rt = cc.find_library('rt') |
42 | git = find_program('git', required: false) | 42 | git = find_program('git', required: false) |
43 | a2x = find_program('a2x', required: false) | ||
44 | 43 | ||
45 | conf_data = configuration_data() | 44 | conf_data = configuration_data() |
46 | 45 | ||
@@ -48,31 +47,25 @@ if gdk_pixbuf.found() | |||
48 | conf_data.set('HAVE_GDK_PIXBUF', true) | 47 | conf_data.set('HAVE_GDK_PIXBUF', true) |
49 | endif | 48 | endif |
50 | 49 | ||
51 | if a2x.found() | 50 | scdoc = find_program('scdoc', required: false) |
51 | |||
52 | if scdoc.found() | ||
53 | sh = find_program('sh') | ||
52 | mandir = get_option('mandir') | 54 | mandir = get_option('mandir') |
53 | man_files = [ | 55 | man_files = [ |
54 | 'sway/sway.1.txt', | 56 | 'sway/sway.1.scd', |
55 | 'sway/sway.5.txt', | ||
56 | 'sway/sway-bar.5.txt', | ||
57 | 'sway/sway-input.5.txt', | ||
58 | 'sway/sway-security.7.txt', | ||
59 | 'swaymsg/swaymsg.1.txt', | ||
60 | ] | 57 | ] |
61 | foreach filename : man_files | 58 | foreach filename : man_files |
62 | topic = filename.split('.')[-3].split('/')[-1] | 59 | topic = filename.split('.')[-3].split('/')[-1] |
63 | section = filename.split('.')[-2] | 60 | section = filename.split('.')[-2] |
61 | output = '@0@.@1@'.format(topic, section) | ||
64 | 62 | ||
65 | custom_target( | 63 | custom_target( |
66 | 'man-@0@-@1@'.format(topic, section), | 64 | output, |
67 | input: filename, | 65 | input: filename, |
68 | output: '@BASENAME@', | 66 | output: output, |
69 | command: [ | 67 | command: [ |
70 | a2x, | 68 | sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc.path(), output) |
71 | '--no-xmllint', | ||
72 | '--doctype', 'manpage', | ||
73 | '--format', 'manpage', | ||
74 | '--destination-dir', meson.current_build_dir(), | ||
75 | '@INPUT@' | ||
76 | ], | 69 | ], |
77 | install: true, | 70 | install: true, |
78 | install_dir: '@0@/man@1@'.format(mandir, section) | 71 | install_dir: '@0@/man@1@'.format(mandir, section) |
diff --git a/sway/sway.1.scd b/sway/sway.1.scd new file mode 100644 index 00000000..02caa048 --- /dev/null +++ b/sway/sway.1.scd | |||
@@ -0,0 +1,95 @@ | |||
1 | sway(1) | ||
2 | |||
3 | # NAME | ||
4 | |||
5 | sway - SirCmpwn's Wayland window manager | ||
6 | |||
7 | # SYNOPSIS | ||
8 | |||
9 | *sway* [options...] [command] | ||
10 | |||
11 | # OPTIONS | ||
12 | |||
13 | *-h, --help* | ||
14 | Show help message and quit. | ||
15 | |||
16 | *-c, --config* <config> | ||
17 | Specifies a config file. | ||
18 | |||
19 | *-C, --validate* | ||
20 | Check the validity of the config file, then exit. | ||
21 | |||
22 | *-d, --debug* | ||
23 | Enables full logging, including debug information. | ||
24 | |||
25 | *-v, --version* | ||
26 | Show the version number and quit. | ||
27 | |||
28 | *-V, --verbose* | ||
29 | Enables more verbose logging. | ||
30 | |||
31 | *--get-socketpath* | ||
32 | Gets the IPC socket path and prints it, then exits. | ||
33 | |||
34 | # DESCRIPTION | ||
35 | |||
36 | sway was created to fill the need of an i3-like window manager for Wayland. The | ||
37 | upstream i3 developers have no intention of porting i3 to Wayland, and projects | ||
38 | proposed by others ended up as vaporware. Many thanks to the i3 folks for | ||
39 | providing such a great piece of software, so good that your users would rather | ||
40 | write an entirely new window manager from scratch that behaved _exactly_ like i3 | ||
41 | rather than switch to something else. | ||
42 | |||
43 | You can run sway directly from a tty, or via a Wayland-compatible login manager. | ||
44 | |||
45 | # CONFIGURATION | ||
46 | |||
47 | sway searches for a config file in the following locations, in this order: | ||
48 | |||
49 | - ~/.sway/config | ||
50 | - $XDG\_CONFIG\_HOME/sway/config (suggested location) | ||
51 | - ~/.i3/config | ||
52 | - $XDG\_CONFIG\_HOME/i3/config | ||
53 | - /etc/sway/config | ||
54 | - /etc/i3/config | ||
55 | |||
56 | If unset, $XDG\_CONFIG\_HOME defalts to *~/.config*. | ||
57 | |||
58 | An error is raised when no config file is found. The recommended default | ||
59 | configuration is usually installed to */etc/sway/config*; you are encouraged to | ||
60 | copy this to *~/.config/sway/config* and edit it from there. | ||
61 | |||
62 | For information on the config file format, see *sway*(5). | ||
63 | |||
64 | # IPC COMMANDS | ||
65 | |||
66 | Though *swaymsg*(1) is generally preferred, you may run *sway* _command_ to | ||
67 | send _command_ to the running instance of sway. You can also issue commands | ||
68 | with *i3-msg*(1) or even with *i3*(1). | ||
69 | |||
70 | # ENVIRONMENT | ||
71 | |||
72 | The following environment variables have an effect on sway: | ||
73 | |||
74 | _SWAY\_CURSOR\_THEME_ | ||
75 | Specifies the name of the cursor theme to use. | ||
76 | |||
77 | _SWAY\_CURSOR\_SIZE_ | ||
78 | Specifies the size of the cursor to use. | ||
79 | |||
80 | _SWAYSOCK_ | ||
81 | Specifies the path to the sway IPC socket. | ||
82 | |||
83 | _XKB\_DEFAULT\_RULES_, _XKB\_DEFAULT\_MODEL_, _XKB\_DEFAULT\_LAYOUT_, | ||
84 | _XKB\_DEFAULT\_VARIANT_, _XKB\_DEFAULT\_OPTIONS_ | ||
85 | Configures the xkb keyboard settings. See *xkeyboard-config*(7). | ||
86 | |||
87 | # AUTHORS | ||
88 | |||
89 | Maintained by Drew DeVault <sir@cmpwn.com>, who is assisted by other open | ||
90 | source contributors. For more information about sway development, see | ||
91 | <https://github.com/swaywm/sway>. | ||
92 | |||
93 | # SEE ALSO | ||
94 | |||
95 | *sway*(5) *swaymsg*(1) *swaygrab*(1) *sway-input*(5) *sway-bar*(5) | ||