From aaba11b7a217a1c871a09d5d6f78b44fd9c5489d Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Sun, 21 Aug 2022 10:30:22 +0200 Subject: [PATCH 1/5] gha: build man pages --- .github/workflows/man-update.yaml | 26 ++++++++++++++++++++++++++ Makefile | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/man-update.yaml diff --git a/.github/workflows/man-update.yaml b/.github/workflows/man-update.yaml new file mode 100644 index 00000000..3ef5fc35 --- /dev/null +++ b/.github/workflows/man-update.yaml @@ -0,0 +1,26 @@ +name: Build man pages + +on: + workflow_dispatch: + push: + paths: + - docs/** + +jobs: + main: + name: Build man pages + runs-on: ubuntu-latest + steps: + - name: Install deps + run: sudo apt install pandoc + - name: Clone repository + uses: actions/checkout@v3 + # Not needed + # with: + # submodules: recursive + - name: Build man pages + run: make man + - uses: stefanzweifel/git-auto-commit-action@v4 + name: Commit + with: + commit_message: "[gha] build man pages" diff --git a/Makefile b/Makefile index 17163df4..f38ffc30 100644 --- a/Makefile +++ b/Makefile @@ -167,7 +167,7 @@ man: --variable=date:"${DATE}" \ --variable=section:1 \ --from rst \ - --to man | gzip -c > /usr/share/man/man1/Hyprland.1.gz + --to man > ./docs/Hyprland.1 pandoc ./docs/hyprctl.1.rst \ --standalone \ @@ -175,4 +175,4 @@ man: --variable=date:"${DATE}" \ --variable=section:1 \ --from rst \ - --to man | gzip -c > /usr/share/man/man1/hyprctl.1.gz + --to man > ./docs/hyprctl.1 From 7ce2c9167385ec37c1469633a708a352fc6f4a3d Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Sun, 21 Aug 2022 10:39:47 +0200 Subject: [PATCH 2/5] doc: build man pages to repo --- docs/Hyprland.1 | 60 ++++++++++++++++++ docs/hyprctl.1 | 159 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 219 insertions(+) create mode 100644 docs/Hyprland.1 create mode 100644 docs/hyprctl.1 diff --git a/docs/Hyprland.1 b/docs/Hyprland.1 new file mode 100644 index 00000000..6571269e --- /dev/null +++ b/docs/Hyprland.1 @@ -0,0 +1,60 @@ +.\" Automatically generated by Pandoc 2.17.1.1 +.\" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "Hyprland" "1" "21 Aug 2022" "" "Hyprland User Manual" +.hy +.SH NAME +.PP +Hyprland - Dynamic tiling Wayland compositor +.SH SYNOPSIS +.PP +\f[B]Hyprland\f[R] [\f[I]arg [...]\f[R]]. +.SH DESCRIPTION +.PP +\f[B]Hyprland\f[R] is a dynamic tiling Wayland compositor based on +wlroots that doesn\[aq]t sacrifice on its looks. +.PP +You can launch Hyprland by either going into a TTY and executing +\f[B]Hyprland\f[R], or with a login manager. +.SH NOTICE +.PP +Hyprland is still in pretty early development compared to some other +Wayland compositors. +.PP +Although Hyprland is pretty stable, it may have some bugs. +.SH CONFIGURATION +.PP +For configuration information please see +<\f[I]https://github.com/hyprwm/Hyprland/wiki\f[R]>. +.SH OPTIONS +.TP +\f[B]-h\f[R], \f[B]--help\f[R] +Show command usage. +.TP +\f[B]-c\f[R], \f[B]--config\f[R] +Specify config file to use. +.SH BUGS +.TP +Submit bug reports and request features online at: +<\f[I]https://github.com/hyprwm/Hyprland/issues\f[R]> +.SH SEE ALSO +.PP +Sources at: <\f[I]https://github.com/hyprwm/Hyprland\f[R]> +.SH COPYRIGHT +.PP +Copyright (c) 2022, vaxerski +.SH AUTHORS +Vaxerski <\f[I]https://github.com/vaxerski\f[R]>. diff --git a/docs/hyprctl.1 b/docs/hyprctl.1 new file mode 100644 index 00000000..1d520950 --- /dev/null +++ b/docs/hyprctl.1 @@ -0,0 +1,159 @@ +.\" Automatically generated by Pandoc 2.17.1.1 +.\" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "hyprctl" "1" "21 Aug 2022" "" "hyprctl User Manual" +.hy +.SH NAME +.PP +hyprctl - Utility for controlling parts of Hyprland from a CLI or a +script +.SH SYNOPSIS +.PP +\f[B]hyprctl\f[R] [\f[I](opt)flags\f[R]] [\f[B]command\f[R]] +[\f[I](opt)args\f[R]] +.SH DESCRIPTION +.PP +\f[B]hyprctl\f[R] is a utility for controlling some parts of the +compositor from a CLI or a script. +.SH CONTROL COMMANDS +.PP +\f[B]dispatch\f[R] +.RS +.PP +Call a dispatcher with an argument. +.PP +An argument must be present. +For dispatchers without parameters it can be anything. +.PP +Returns: \f[I]ok\f[R] on success, and an error message on failure. +.TP +Examples: +\f[B]hyprctl\f[R] \f[I]dispatch exec kitty\f[R] +.RS +.PP +\f[B]hyprctl\f[R] \f[I]dispatch pseudo x\f[R] +.RE +.RE +.PP +\f[B]keyword\f[R] +.RS +.PP +Set a config keyword dynamically. +.PP +Returns: \f[I]ok\f[R] on success, and an error message on failure. +.TP +Examples: +\f[B]hyprctl\f[R] \f[I]keyword bind SUPER,0,pseudo\f[R] +.RS +.PP +\f[B]hyprctl\f[R] \f[I]keyword general:border_size 10\f[R] +.RE +.RE +.PP +\f[B]reload\f[R] +.RS +.PP +Force a reload of the config file. +.RE +.PP +\f[B]kill\f[R] +.RS +.PP +Enter kill mode, where you can kill an app by clicking on it. +You can exit by pressing ESCAPE. +.RE +.SH INFO COMMANDS +.PP +\f[B]version\f[R] +.RS +.PP +Prints the Hyprland version, flags, commit and branch of build. +.RE +.PP +\f[B]monitors\f[R] +.RS +.PP +Lists all the outputs with their properties. +.RE +.PP +\f[B]workspaces\f[R] +.RS +.PP +Lists all workspaces with their properties. +.RE +.PP +\f[B]clients\f[R] +.RS +.PP +Lists all windows with their properties. +.RE +.PP +\f[B]devices\f[R] +.RS +.PP +Lists all connected input devices. +.RE +.PP +\f[B]activewindow\f[R] +.RS +.PP +Returns the active window name. +.RE +.PP +\f[B]layers\f[R] +.RS +.PP +Lists all the layers. +.RE +.PP +\f[B]splash\f[R] +.RS +.PP +Returns the current random splash. +.RE +.SH OPTIONS +.PP +\f[B]--batch\f[R] +.RS +.PP +Specify a batch of commands to execute. +.TP +Example: +\f[B]hyprctl\f[R] \f[I]--batch \[dq]keyword general:border_size 2 ; +keyword general:gaps_out 20\[dq]\f[R] +.RS +.PP +\f[I];\f[R] separates the commands. +.RE +.RE +.PP +\f[B]-j\f[R] +.RS +.PP +Outputs information in JSON. +.RE +.SH BUGS +.TP +Submit bug reports and request features online at: +<\f[I]https://github.com/hyprwm/Hyprland/issues\f[R]> +.SH SEE ALSO +.PP +Sources at: <\f[I]https://github.com/hyprwm/Hyprland\f[R]> +.SH COPYRIGHT +.PP +Copyright (c) 2022, vaxerski +.SH AUTHORS +Vaxerski <\f[I]https://github.com/vaxerski\f[R]>. From 12cdca7422953fbd2f335e38a8d4c2718d693c2d Mon Sep 17 00:00:00 2001 From: viperML Date: Sun, 21 Aug 2022 08:40:27 +0000 Subject: [PATCH 3/5] [gha] build man pages --- docs/Hyprland.1 | 24 +++++------------------- docs/hyprctl.1 | 32 +++++++++----------------------- 2 files changed, 14 insertions(+), 42 deletions(-) diff --git a/docs/Hyprland.1 b/docs/Hyprland.1 index 6571269e..689c2ed3 100644 --- a/docs/Hyprland.1 +++ b/docs/Hyprland.1 @@ -1,24 +1,10 @@ -.\" Automatically generated by Pandoc 2.17.1.1 +.\" Automatically generated by Pandoc 2.5 .\" -.\" Define V font for inline verbatim, using C font in formats -.\" that render this, and otherwise B font. -.ie "\f[CB]x\f[]"x" \{\ -. ftr V B -. ftr VI BI -. ftr VB B -. ftr VBI BI -.\} -.el \{\ -. ftr V CR -. ftr VI CI -. ftr VB CB -. ftr VBI CBI -.\} .TH "Hyprland" "1" "21 Aug 2022" "" "Hyprland User Manual" .hy .SH NAME .PP -Hyprland - Dynamic tiling Wayland compositor +Hyprland \- Dynamic tiling Wayland compositor .SH SYNOPSIS .PP \f[B]Hyprland\f[R] [\f[I]arg [...]\f[R]]. @@ -41,14 +27,14 @@ For configuration information please see <\f[I]https://github.com/hyprwm/Hyprland/wiki\f[R]>. .SH OPTIONS .TP -\f[B]-h\f[R], \f[B]--help\f[R] +.B \f[B]\-h\f[R], \f[B]\-\-help\f[R] Show command usage. .TP -\f[B]-c\f[R], \f[B]--config\f[R] +.B \f[B]\-c\f[R], \f[B]\-\-config\f[R] Specify config file to use. .SH BUGS .TP -Submit bug reports and request features online at: +.B Submit bug reports and request features online at: <\f[I]https://github.com/hyprwm/Hyprland/issues\f[R]> .SH SEE ALSO .PP diff --git a/docs/hyprctl.1 b/docs/hyprctl.1 index 1d520950..db5cc736 100644 --- a/docs/hyprctl.1 +++ b/docs/hyprctl.1 @@ -1,24 +1,10 @@ -.\" Automatically generated by Pandoc 2.17.1.1 +.\" Automatically generated by Pandoc 2.5 .\" -.\" Define V font for inline verbatim, using C font in formats -.\" that render this, and otherwise B font. -.ie "\f[CB]x\f[]"x" \{\ -. ftr V B -. ftr VI BI -. ftr VB B -. ftr VBI BI -.\} -.el \{\ -. ftr V CR -. ftr VI CI -. ftr VB CB -. ftr VBI CBI -.\} .TH "hyprctl" "1" "21 Aug 2022" "" "hyprctl User Manual" .hy .SH NAME .PP -hyprctl - Utility for controlling parts of Hyprland from a CLI or a +hyprctl \- Utility for controlling parts of Hyprland from a CLI or a script .SH SYNOPSIS .PP @@ -40,7 +26,7 @@ For dispatchers without parameters it can be anything. .PP Returns: \f[I]ok\f[R] on success, and an error message on failure. .TP -Examples: +.B Examples: \f[B]hyprctl\f[R] \f[I]dispatch exec kitty\f[R] .RS .PP @@ -55,7 +41,7 @@ Set a config keyword dynamically. .PP Returns: \f[I]ok\f[R] on success, and an error message on failure. .TP -Examples: +.B Examples: \f[B]hyprctl\f[R] \f[I]keyword bind SUPER,0,pseudo\f[R] .RS .PP @@ -126,13 +112,13 @@ Returns the current random splash. .RE .SH OPTIONS .PP -\f[B]--batch\f[R] +\f[B]\-\-batch\f[R] .RS .PP Specify a batch of commands to execute. .TP -Example: -\f[B]hyprctl\f[R] \f[I]--batch \[dq]keyword general:border_size 2 ; +.B Example: +\f[B]hyprctl\f[R] \f[I]\-\-batch \[dq]keyword general:border_size 2 ; keyword general:gaps_out 20\[dq]\f[R] .RS .PP @@ -140,14 +126,14 @@ keyword general:gaps_out 20\[dq]\f[R] .RE .RE .PP -\f[B]-j\f[R] +\f[B]\-j\f[R] .RS .PP Outputs information in JSON. .RE .SH BUGS .TP -Submit bug reports and request features online at: +.B Submit bug reports and request features online at: <\f[I]https://github.com/hyprwm/Hyprland/issues\f[R]> .SH SEE ALSO .PP From 463bc7ab13b9707857f32943ee5ca6ad98384f71 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Sun, 21 Aug 2022 17:24:46 +0200 Subject: [PATCH 4/5] doc: install mapages --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index f38ffc30..f2fe4b88 100644 --- a/Makefile +++ b/Makefile @@ -136,12 +136,16 @@ install: cp ./assets/wall_4K.png ${PREFIX}/share/hyprland cp ./assets/wall_8K.png ${PREFIX}/share/hyprland + install -Dm644 -t ${PREFIX}/share/man/man1 ./docs/*.1 + uninstall: rm -f ${PREFIX}/share/wayland-sessions/hyprland.desktop rm -f ${PREFIX}/bin/Hyprland rm -f ${PREFIX}/bin/hyprctl rm -f /usr/lib/libwlroots.so.11032 rm -rf ${PREFIX}/share/hyprland + rm -f ${PREFIX}/share/man/man1/Hyprland.1 + rm -f ${PREFIX}/share/man/man1/hyprctl.1 protocols: xdg-shell-protocol.o wlr-layer-shell-unstable-v1-protocol.o wlr-screencopy-unstable-v1-protocol.o idle-protocol.o ext-workspace-unstable-v1-protocol.o pointer-constraints-unstable-v1-protocol.o tablet-unstable-v2-protocol.o wlr-output-power-management-unstable-v1-protocol.o From fea6d7deb0a59e96c2d66e3e8a0b41e0debd1428 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Sun, 21 Aug 2022 17:58:03 +0200 Subject: [PATCH 5/5] docs: install manpages with meson --- .gitignore | 4 ++-- docs/meson.build | 2 ++ meson.build | 1 + nix/default.nix | 5 +++++ 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 docs/meson.build diff --git a/.gitignore b/.gitignore index 27b80f06..d52b86fc 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ CTestTestfile.cmake _deps build/ -result +result* /.vscode/ .envrc .cache @@ -24,4 +24,4 @@ hyprctl/hyprctl gmon.out *.out -*.tar.gz \ No newline at end of file +*.tar.gz diff --git a/docs/meson.build b/docs/meson.build new file mode 100644 index 00000000..a5d7e737 --- /dev/null +++ b/docs/meson.build @@ -0,0 +1,2 @@ +install_man ('Hyprland.1') +install_man ('hyprctl.1') diff --git a/meson.build b/meson.build index 94353336..e0f5d3fe 100644 --- a/meson.build +++ b/meson.build @@ -59,3 +59,4 @@ subdir('src') subdir('hyprctl') subdir('assets') subdir('example') +subdir('docs') diff --git a/nix/default.nix b/nix/default.nix index adabd69f..ffea6e0c 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -44,6 +44,11 @@ stdenv.mkDerivation { pkg-config ]; + outputs = [ + "out" + "man" + ]; + buildInputs = [ git