diff --git a/.build.yml b/.build.yml index 3cfb7483c..144333118 100644 --- a/.build.yml +++ b/.build.yml @@ -12,6 +12,7 @@ packages: - gdk-pixbuf2 - libinput - libxkbcommon + - scdoc sources: - https://github.com/swaywm/sway - https://github.com/swaywm/wlroots diff --git a/README.de.md b/README.de.md index d63d83187..206a1040b 100644 --- a/README.de.md +++ b/README.de.md @@ -58,7 +58,6 @@ Abhängigkeiten: * xwayland * libinput >= 1.6.0 * libcap -* asciidoc * pcre * json-c >= 0.13 * pango @@ -67,6 +66,7 @@ Abhängigkeiten: * pam ** * imagemagick (erforderlich für Bildaufnahme mit swaygrab) * ffmpeg (erforderlich für Videoaufnahme swaygrab) +* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (erforderlich für man pages) _\*Nur erforderlich für swaybar, swaybg, und swaylock_ diff --git a/README.el.md b/README.el.md index 682dbc844..5c70beff9 100644 --- a/README.el.md +++ b/README.el.md @@ -51,7 +51,6 @@ To username μου στο Freenode είναι kon14 και θα με βρείτ * xwayland * libinput >= 1.6.0 * libcap -* asciidoc * pcre * json-c >= 0.13 * pango @@ -60,6 +59,7 @@ To username μου στο Freenode είναι kon14 και θα με βρείτ * pam ** * imagemagick (αναγκαίο για καταγραφή εικόνας μέσω του swaygrab) * ffmpeg (αναγκαίο για καταγραφή video μέσω του swaygrab) +* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (required for man pages) _\*Απαιτείται μόνο για swaybar, swaybg, and swaylock_ diff --git a/README.fr.md b/README.fr.md index 360fe6181..0d2573f91 100644 --- a/README.fr.md +++ b/README.fr.md @@ -53,7 +53,6 @@ Installez les dépendances : * xwayland * libinput >= 1.6.0 * libcap -* asciidoc * pcre * json-c >= 0.13 * pango @@ -62,6 +61,7 @@ Installez les dépendances : * pam ** * imagemagick (requis pour la capture d'image avec swaygrab) * ffmpeg (requis pour la capture vidéo avec swaygrab) +* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (requis pour les pages man) _\*Uniquement requis pour swaybar, swaybg, and swaylock_ diff --git a/README.it.md b/README.it.md index 94dc96c6c..0d81ea54c 100644 --- a/README.it.md +++ b/README.it.md @@ -54,7 +54,6 @@ Installa queste dipendenze: * xwayland * libinput >= 1.6.0 * libcap -* asciidoc * pcre * json-c >= 0.13 * pango @@ -63,6 +62,7 @@ Installa queste dipendenze: * pam ** * imagemagick (richiesto per catturare immagini con swaygrab) * ffmpeg (rrichiesto per catturare video con swaygrab) +* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (rrichiesto per man pages) _\*Richiesto solo per swaybar, swaybg, e swaylock_ diff --git a/README.ja.md b/README.ja.md index 42d31b86e..476d7472c 100644 --- a/README.ja.md +++ b/README.ja.md @@ -44,7 +44,6 @@ Swayは沢山のディストリビューションで提供されています。" * xwayland * libinput >= 1.6.0 * libcap -* asciidoc * pcre * json-c >= 0.13 * pango @@ -53,6 +52,7 @@ Swayは沢山のディストリビューションで提供されています。" * pam ** * imagemagick (swaygrabでスクリーンショットを撮るのに必要です) * ffmpeg (swaygrabで画面を録画するのに必要です) +* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (manで必要です) _\*swaybar,swaybg,swaylockでのみ必要です_ diff --git a/README.md b/README.md index 309117657..49140fb8f 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,6 @@ Install dependencies: * xwayland * libinput >= 1.6.0 * libcap -* asciidoc * pcre * json-c >= 0.13 * pango @@ -61,6 +60,7 @@ Install dependencies: * dbus >= 1.10 *** * imagemagick (required for image capture with swaygrab) * ffmpeg (required for video capture with swaygrab) +* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (required for man pages) _\*Only required for swaybar, swaybg, and swaylock_ diff --git a/README.pt.md b/README.pt.md index 98ad72e31..d1ef245f6 100644 --- a/README.pt.md +++ b/README.pt.md @@ -60,7 +60,6 @@ Antes de iniciar a compilação, instale as dependências: * xwayland * libinput >= 1.6.0 * libcap -* asciidoc * pcre * json-c >= 0.13 * pango @@ -69,6 +68,7 @@ Antes de iniciar a compilação, instale as dependências: * pam ** * imagemagick (capturar imagem com o swaygrab) * ffmpeg (capturar vídeo com o swaygrab) +* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (man pages) _\*Dependência apenas de swaybar, swaybg, e swaylock_ diff --git a/README.ru.md b/README.ru.md index 7329303e7..3b3de19a5 100644 --- a/README.ru.md +++ b/README.ru.md @@ -55,7 +55,6 @@ Sway доступен во многих дистрибутивах и наход * xwayland * libinput >= 1.6.0 * libcap -* asciidoc * pcre * json-c >= 0.13 * pango @@ -65,6 +64,7 @@ Sway доступен во многих дистрибутивах и наход * dbus >= 1.10 *** * imagemagick (требуется для захвата изображений через swaygrab) * ffmpeg (требуется для захвата видео через swaygrab) +* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (required for man pages) _\*Требуется только для swaybar, swaybg и swaylock_ diff --git a/README.uk.md b/README.uk.md index 81bc70fab..556984872 100644 --- a/README.uk.md +++ b/README.uk.md @@ -60,7 +60,6 @@ Sway доступний у багатьох дистрибутивах Linux (а * xwayland * libinput >= 1.6.0 * libcap -* asciidoc * pcre * json-c >= 0.13 * pango @@ -69,6 +68,7 @@ Sway доступний у багатьох дистрибутивах Linux (а * pam ** * imagemagick (для захоплення зображень за допомогою swaygrab) * ffmpeg (для захоплення відео за допомогою swaygrab) +* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (required for man pages) _\*Лише для swaybar, swaybg та swaylock_ diff --git a/meson.build b/meson.build index f59d29b30..a1f406ec8 100644 --- a/meson.build +++ b/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,30 @@ 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', + 'sway/sway.5.scd', + 'sway/sway-bar.5.scd', + 'sway/sway-input.5.scd', + 'swaylock/swaylock.1.scd', + 'swaymsg/swaymsg.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) diff --git a/sway/sway-bar.5.txt b/sway/sway-bar.5.scd similarity index 52% rename from sway/sway-bar.5.txt rename to sway/sway-bar.5.scd index 992389520..a61e28299 100644 --- a/sway/sway-bar.5.txt +++ b/sway/sway-bar.5.scd @@ -1,159 +1,147 @@ -///// -vim:set ts=4 sw=4 tw=82 noet: -///// -sway-bar (5) -============ +sway-bar(5) + +# NAME -Name ----- sway-bar - bar configuration file and commands -Description ------------ +# DESCRIPTION -Sway allows configuring swaybar in the sway configuration file. -Swaybar commands must be used inside a _bar { }_ block in the config file. +Sway allows configuring swaybar in the sway configuration file. Swaybar +commands must be used inside a _bar { }_ block in the config file. +# COMMANDS -Commands --------- +*status\_command* + Executes the bar _status command_ with _sh -c_. Each line of text printed + to stdout from this command will be displayed in the status area of the + bar. You may also use the i3bar JSON protocol: -**status_command** :: - Executes the bar _status command_ with _sh -c_. Each line of text printed to - stdout from this command will be displayed in the status area of the bar. You - may also use the i3bar JSON protocol: - + https://i3wm.org/docs/i3bar-protocol.html -**pango_markup** :: +*pango\_markup* enabled|disabled Enables or disables pango markup for status lines. This has no effect on status lines using the i3bar JSON protocol. -**id** :: +*id* Sets the ID of the bar. -**position** :: +*position* top|bottom Sets position of the bar. Default is _bottom_. -**output** :: - Restrict the bar to a certain output, can be specified multiple times. If the - output command is omitted, the bar will be displayed on all outputs. +*output* + Restrict the bar to a certain output, can be specified multiple times. If + the output command is omitted, the bar will be displayed on all outputs. -**swaybar_command** :: - Executes custom bar command, default is _swaybar_. +*swaybar\_command* + Executes custom bar command. Default is _swaybar_. -**font** :: +*font* Specifies the font to be used in the bar. -**separator_symbol** :: +*separator\_symbol* Specifies the separator symbol to separate blocks on the bar. -**wrap_scroll** :: +*wrap\_scroll* yes|no Enables or disables wrapping when scrolling through workspaces with the scroll wheel. Default is _no_. -**workspace_buttons** :: +*workspace\_buttons* yes|no Enables or disables workspace buttons on the bar. Default is _yes_. -**strip_workspace_numbers** :: +*strip\_workspace\_numbers* yes|no If set to _yes_, then workspace numbers will be omitted from the workspace button and only the custom name will be shown. Default is _no_. -**binding_mode_indicator** :: +*binding\_mode\_indicator* yes|no Enable or disable binding mode indicator. Default is _yes_. -**height** :: +*height* Sets the height of the bar. Default height will match the font size. -Tray ----- +## TRAY -Swaybar provides a system tray where programs such as NetworkManager, VLC, -Pidgin, etc. can place little icons. The following commands configure -interaction with the tray or individual icons. -The _button_ argument in all following commands is a Linux input event code as -defined in linux/input-event-codes.h. This is because wayland defines button -codes in this manner. +Swaybar provides a system tray where third-party applications may place icons. +The following commands configure the tray. -**activate_button**