From 310a8397003146e416e06d777e8404ea469f02bd Mon Sep 17 00:00:00 2001 From: Blake Lee Date: Fri, 15 Jul 2022 20:04:17 -0400 Subject: [PATCH 1/5] docs: add man pages --- Makefile | 2 + docs/Hyprland.1.rst | 75 +++++++++++++++++++++++++ docs/hyprctl.1.rst | 131 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+) create mode 100644 docs/Hyprland.1.rst create mode 100644 docs/hyprctl.1.rst diff --git a/Makefile b/Makefile index 99ac1324..48d5f8dd 100644 --- a/Makefile +++ b/Makefile @@ -124,6 +124,8 @@ install: cp ./assets/wall_4K.png ${PREFIX}/share/hyprland cp ./assets/wall_8K.png ${PREFIX}/share/hyprland + rst2man ./docs/hyprctl.1.rst | gzip -c > /usr/share/man/man1/hyprctl.1.gz + rst2man ./docs/Hyprland.1.rst | gzip -c > /usr/share/man/man1/Hyprland.1.gz uninstall: rm -f ${PREFIX}/share/wayland-sessions/hyprland.desktop diff --git a/docs/Hyprland.1.rst b/docs/Hyprland.1.rst new file mode 100644 index 00000000..78b2cda0 --- /dev/null +++ b/docs/Hyprland.1.rst @@ -0,0 +1,75 @@ +======== +Hyprland +======== + +--------------------------------- +Dynamic tiling Wayland compositor +--------------------------------- + +:Date: 15 Jul 2022 +:Copyright: Copyright (c) 2022, vaxerski +:Version: 0.7.1beta +:Manual section: 1 +:Manual group: HYPRLAND + +SYNOPSIS +======== + +``Hyprland`` [arg [...]]. + +DESCRIPTION +=========== + +``Hyprland`` is a dynamic tiling Wayland compositor based on +wlroots that doesn't sacrifice on its looks. + +NOTICE +====== + +Hyprland is still in pretty early development compared to some other Wayland compositors. + +Although Hyprland is pretty stable, it may have some bugs. + +CONFIGURATION +============= + +For configuration information please see <`https://github.com/hyprwm/Hyprland/wiki`>. + +LAUNCHING +========= + +You can launch Hyprland by either going into a TTY and executing ``Hyprland``, or with a login manager. + +`IMPORTANT`: Do `not` launch ``Hyprland`` with `root` permissions (don't `sudo`) + +Login managers are not officially supported, but here's a short compatibility list: + + * SDDM -> Works flawlessly. + * GDM -> Works with the caveat of crashing `Hyprland` on the first launch. + * ly -> Works with minor issues and/or caveats. + +OPTIONS +======= + +-h, --help + Show this help message. + +-c, --config + Specify config file to use. + +BUGS +==== + +Submit bug reports and feature requests online at: + + <`https://github.com/hyprwm/Hyprland/issues`> + +SEE ALSO +======== + +Sources at: <`https://github.com/hyprwm/Hyprland`> + +AUTHORS +======= + +Vaxerski <`https://github.com/vaxerski`> diff --git a/docs/hyprctl.1.rst b/docs/hyprctl.1.rst new file mode 100644 index 00000000..3b1e68fa --- /dev/null +++ b/docs/hyprctl.1.rst @@ -0,0 +1,131 @@ +======= +hyprctl +======= + +---------------------------------------------------------------- +Utility for controlling parts of Hyprland from a CLI or a script +---------------------------------------------------------------- + +:Date: 15 Jul 2022 +:Copyright: Copyright (c) 2022, vaxerski +:Version: 0.7.1beta +:Manual section: 1 +:Manual group: hyprctl + +SYNOPSIS +======== + +``hyprctl`` [(opt)flags] [command] [(opt)args] + +DESCRIPTION +=========== + +``hyprctl`` is a utility for controlling some parts of the compositor from a CLI or a script. +If you install with make install, or any package, it should automatically be installed. + +COMMANDS +======== + +Control + + ``dispatch`` + + Call a keybinding dispatcher with an argument. + + An argument must be present. + For dispatchers without parameters it can be anything. + + Returns: `ok` on success, and an error message on failure. + + Examples: + + ``hyprctl`` `dispatch exec kitty` + + ``hyprctl`` `dispatch pseudo x` + + ``keyword`` + + Call a config keyword dynamically. + + Returns: `ok` on success, and an error message on failure. + + Examples: + + ``hyprctl`` `keyword bind SUPER,0,pseudo` + + ``hyprctl`` `keyword general:border_size 10` + + ``reload`` + + Force a reload of the config file. + + ``kill`` + + Enter kill mode, where you can kill an app by clicking on it. + You can exit with ESCAPE. + +Info + + ``version`` + + Prints the hyprland version, meaning flags, commit and branch of build. + + ``monitors`` + + Lists all the outputs with their properties. + + ``workspaces`` + + Lists all workspaces with their properties. + + ``clients`` + + Lists all windows with their properties. + + ``devices`` + + Lists all connected keyboards and mice. + + ``activewindow`` + + Gets the active window name. + + ``layers`` + + Lists all the layers. + + ``splash`` + + Prints the current random splash. + +OPTIONS +======= + +--batch + Specify a batch of commands to execute. + + Example: + + ``hyprctl`` `--batch "keyword general:border_size 2 ; keyword general:gaps_out 20"` + + `;` separates the commands. + +-j + Outputs information in JSON. + +BUGS +==== + +Submit bug reports and feature requests online at: + + <`https://github.com/hyprwm/hyprctl/issues`> + +SEE ALSO +======== + +Sources at: <`https://github.com/hyprwm/hyprctl`> + +AUTHORS +======= + +Vaxerski <`https://github.com/vaxerski`> From 9fc74a708e45e8f8beb892765f6f991dd32ef9bc Mon Sep 17 00:00:00 2001 From: volitank Date: Fri, 15 Jul 2022 22:25:03 -0400 Subject: [PATCH 2/5] Apply suggestions from code review Co-authored-by: Mihai Fufezan --- docs/Hyprland.1.rst | 4 ++-- docs/hyprctl.1.rst | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/Hyprland.1.rst b/docs/Hyprland.1.rst index 78b2cda0..332d8266 100644 --- a/docs/Hyprland.1.rst +++ b/docs/Hyprland.1.rst @@ -52,7 +52,7 @@ OPTIONS ======= -h, --help - Show this help message. + Show command usage. -c, --config Specify config file to use. @@ -60,7 +60,7 @@ OPTIONS BUGS ==== -Submit bug reports and feature requests online at: +Submit bug reports and request features online at: <`https://github.com/hyprwm/Hyprland/issues`> diff --git a/docs/hyprctl.1.rst b/docs/hyprctl.1.rst index 3b1e68fa..1ab8bdbf 100644 --- a/docs/hyprctl.1.rst +++ b/docs/hyprctl.1.rst @@ -30,7 +30,7 @@ Control ``dispatch`` - Call a keybinding dispatcher with an argument. + Call a dispatcher with an argument. An argument must be present. For dispatchers without parameters it can be anything. @@ -45,7 +45,7 @@ Control ``keyword`` - Call a config keyword dynamically. + Set a config keyword dynamically. Returns: `ok` on success, and an error message on failure. @@ -62,13 +62,13 @@ Control ``kill`` Enter kill mode, where you can kill an app by clicking on it. - You can exit with ESCAPE. + You can exit by pressing ESCAPE. Info ``version`` - Prints the hyprland version, meaning flags, commit and branch of build. + Prints the Hyprland version, flags, commit and branch of build. ``monitors`` @@ -84,11 +84,11 @@ Info ``devices`` - Lists all connected keyboards and mice. + Lists all connected input devices. ``activewindow`` - Gets the active window name. + Returns the active window name. ``layers`` @@ -96,7 +96,7 @@ Info ``splash`` - Prints the current random splash. + Returns the current random splash. OPTIONS ======= From 88506d428485e25b609d90cd46da16d5ccf4a317 Mon Sep 17 00:00:00 2001 From: Blake Lee Date: Fri, 15 Jul 2022 22:34:35 -0400 Subject: [PATCH 3/5] Apply suggestions from code review --- docs/Hyprland.1.rst | 18 ++++-------------- docs/hyprctl.1.rst | 1 - 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/docs/Hyprland.1.rst b/docs/Hyprland.1.rst index 332d8266..8c4cbc66 100644 --- a/docs/Hyprland.1.rst +++ b/docs/Hyprland.1.rst @@ -10,7 +10,7 @@ Dynamic tiling Wayland compositor :Copyright: Copyright (c) 2022, vaxerski :Version: 0.7.1beta :Manual section: 1 -:Manual group: HYPRLAND +:Manual group: Hyprland SYNOPSIS ======== @@ -23,6 +23,9 @@ DESCRIPTION ``Hyprland`` is a dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. +You can launch Hyprland by either going into a TTY and +executing ``Hyprland``, or with a login manager. + NOTICE ====== @@ -35,19 +38,6 @@ CONFIGURATION For configuration information please see <`https://github.com/hyprwm/Hyprland/wiki`>. -LAUNCHING -========= - -You can launch Hyprland by either going into a TTY and executing ``Hyprland``, or with a login manager. - -`IMPORTANT`: Do `not` launch ``Hyprland`` with `root` permissions (don't `sudo`) - -Login managers are not officially supported, but here's a short compatibility list: - - * SDDM -> Works flawlessly. - * GDM -> Works with the caveat of crashing `Hyprland` on the first launch. - * ly -> Works with minor issues and/or caveats. - OPTIONS ======= diff --git a/docs/hyprctl.1.rst b/docs/hyprctl.1.rst index 1ab8bdbf..42606bd4 100644 --- a/docs/hyprctl.1.rst +++ b/docs/hyprctl.1.rst @@ -21,7 +21,6 @@ DESCRIPTION =========== ``hyprctl`` is a utility for controlling some parts of the compositor from a CLI or a script. -If you install with make install, or any package, it should automatically be installed. COMMANDS ======== From a312f8e0ac683e1bd61d499f267845f8510b9881 Mon Sep 17 00:00:00 2001 From: Blake Lee Date: Mon, 18 Jul 2022 18:56:46 -0400 Subject: [PATCH 4/5] replace `rst2man` with `pandoc` --- Makefile | 25 ++++++++- docs/Hyprland.1.rst | 39 ++++++-------- docs/hyprctl.1.rst | 123 ++++++++++++++++++++------------------------ 3 files changed, 96 insertions(+), 91 deletions(-) diff --git a/Makefile b/Makefile index 48d5f8dd..9e251da2 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,9 @@ PKGS = wlroots wayland-server xcb xkbcommon libinput CFLAGS += $(foreach p,$(PKGS),$(shell pkg-config --cflags $(p))) LDLIBS += $(foreach p,$(PKGS),$(shell pkg-config --libs $(p))) +VERSION=0.7.1beta +DATE=$(shell date "+%d %b %Y") + xdg-shell-protocol.h: $(WAYLAND_SCANNER) server-header \ $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ @@ -124,8 +127,7 @@ install: cp ./assets/wall_4K.png ${PREFIX}/share/hyprland cp ./assets/wall_8K.png ${PREFIX}/share/hyprland - rst2man ./docs/hyprctl.1.rst | gzip -c > /usr/share/man/man1/hyprctl.1.gz - rst2man ./docs/Hyprland.1.rst | gzip -c > /usr/share/man/man1/Hyprland.1.gz + make man uninstall: rm -f ${PREFIX}/share/wayland-sessions/hyprland.desktop @@ -150,3 +152,22 @@ config: cd subprojects/wlroots && ninja -C build/ cd subprojects/wlroots && ninja -C build/ install + +man: + pandoc ./docs/Hyprland.1.rst \ + --standalone \ + --variable=header:"Hyprland User Manual" \ + --variable=footer:${VERSION} \ + --variable=date:"${DATE}" \ + --variable=section:1 \ + --from rst \ + --to man | gzip -c > /usr/share/man/man1/Hyprland.1.gz + + pandoc ./docs/hyprctl.1.rst \ + --standalone \ + --variable=header:"hyprctl User Manual" \ + --variable=footer:${VERSION} \ + --variable=date:"${DATE}" \ + --variable=section:1 \ + --from rst \ + --to man | gzip -c > /usr/share/man/man1/hyprctl.1.gz diff --git a/docs/Hyprland.1.rst b/docs/Hyprland.1.rst index 8c4cbc66..54126501 100644 --- a/docs/Hyprland.1.rst +++ b/docs/Hyprland.1.rst @@ -1,30 +1,24 @@ -======== -Hyprland -======== +:title: Hyprland +:author: Vaxerski <*https://github.com/vaxerski*> ---------------------------------- -Dynamic tiling Wayland compositor ---------------------------------- +NAME +==== -:Date: 15 Jul 2022 -:Copyright: Copyright (c) 2022, vaxerski -:Version: 0.7.1beta -:Manual section: 1 -:Manual group: Hyprland +Hyprland - Dynamic tiling Wayland compositor SYNOPSIS ======== -``Hyprland`` [arg [...]]. +**Hyprland** [*arg [...]*]. DESCRIPTION =========== -``Hyprland`` is a dynamic tiling Wayland compositor based on +**Hyprland** is a dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. You can launch Hyprland by either going into a TTY and -executing ``Hyprland``, or with a login manager. +executing **Hyprland**, or with a login manager. NOTICE ====== @@ -36,30 +30,29 @@ Although Hyprland is pretty stable, it may have some bugs. CONFIGURATION ============= -For configuration information please see <`https://github.com/hyprwm/Hyprland/wiki`>. +For configuration information please see <*https://github.com/hyprwm/Hyprland/wiki*>. OPTIONS ======= --h, --help +**-h**, **--help** Show command usage. --c, --config +**-c**, **--config** Specify config file to use. BUGS ==== Submit bug reports and request features online at: - - <`https://github.com/hyprwm/Hyprland/issues`> + <*https://github.com/hyprwm/Hyprland/issues*> SEE ALSO ======== -Sources at: <`https://github.com/hyprwm/Hyprland`> +Sources at: <*https://github.com/hyprwm/Hyprland*> -AUTHORS -======= +COPYRIGHT +========= -Vaxerski <`https://github.com/vaxerski`> +Copyright (c) 2022, vaxerski diff --git a/docs/hyprctl.1.rst b/docs/hyprctl.1.rst index 42606bd4..4db0807e 100644 --- a/docs/hyprctl.1.rst +++ b/docs/hyprctl.1.rst @@ -1,130 +1,121 @@ -======= -hyprctl -======= +:title: hyprctl(1) +:author: Vaxerski <*https://github.com/vaxerski*> ----------------------------------------------------------------- -Utility for controlling parts of Hyprland from a CLI or a script ----------------------------------------------------------------- +NAME +==== -:Date: 15 Jul 2022 -:Copyright: Copyright (c) 2022, vaxerski -:Version: 0.7.1beta -:Manual section: 1 -:Manual group: hyprctl +hyprctl - Utility for controlling parts of Hyprland from a CLI or a script SYNOPSIS ======== -``hyprctl`` [(opt)flags] [command] [(opt)args] +**hyprctl** [*(opt)flags*] [**command**] [*(opt)args*] DESCRIPTION =========== -``hyprctl`` is a utility for controlling some parts of the compositor from a CLI or a script. +**hyprctl** is a utility for controlling some parts of the compositor from a CLI or a script. -COMMANDS -======== +CONTROL COMMANDS +================ -Control +**dispatch** - ``dispatch`` + Call a dispatcher with an argument. - Call a dispatcher with an argument. + An argument must be present. + For dispatchers without parameters it can be anything. - An argument must be present. - For dispatchers without parameters it can be anything. + Returns: *ok* on success, and an error message on failure. - Returns: `ok` on success, and an error message on failure. + Examples: + **hyprctl** *dispatch exec kitty* - Examples: + **hyprctl** *dispatch pseudo x* - ``hyprctl`` `dispatch exec kitty` +**keyword** - ``hyprctl`` `dispatch pseudo x` + Set a config keyword dynamically. - ``keyword`` + Returns: *ok* on success, and an error message on failure. - Set a config keyword dynamically. + Examples: + **hyprctl** *keyword bind SUPER,0,pseudo* - Returns: `ok` on success, and an error message on failure. + **hyprctl** *keyword general:border_size 10* - Examples: +**reload** - ``hyprctl`` `keyword bind SUPER,0,pseudo` + Force a reload of the config file. - ``hyprctl`` `keyword general:border_size 10` +**kill** - ``reload`` + Enter kill mode, where you can kill an app by clicking on it. + You can exit by pressing ESCAPE. - Force a reload of the config file. +INFO COMMANDS +============= - ``kill`` +**version** - Enter kill mode, where you can kill an app by clicking on it. - You can exit by pressing ESCAPE. + Prints the Hyprland version, flags, commit and branch of build. -Info +**monitors** - ``version`` + Lists all the outputs with their properties. - Prints the Hyprland version, flags, commit and branch of build. +**workspaces** - ``monitors`` + Lists all workspaces with their properties. - Lists all the outputs with their properties. +**clients** - ``workspaces`` + Lists all windows with their properties. - Lists all workspaces with their properties. +**devices** - ``clients`` + Lists all connected input devices. - Lists all windows with their properties. +**activewindow** - ``devices`` + Returns the active window name. - Lists all connected input devices. +**layers** - ``activewindow`` + Lists all the layers. - Returns the active window name. +**splash** - ``layers`` - - Lists all the layers. - - ``splash`` - - Returns the current random splash. + Returns the current random splash. OPTIONS ======= ---batch +**--batch** + Specify a batch of commands to execute. Example: + **hyprctl** *--batch "keyword general:border_size 2 ; keyword general:gaps_out 20"* - ``hyprctl`` `--batch "keyword general:border_size 2 ; keyword general:gaps_out 20"` + *;* separates the commands. - `;` separates the commands. +**-j** --j Outputs information in JSON. BUGS ==== -Submit bug reports and feature requests online at: - - <`https://github.com/hyprwm/hyprctl/issues`> +Submit bug reports and request features online at: + <*https://github.com/hyprwm/Hyprland/issues*> SEE ALSO ======== -Sources at: <`https://github.com/hyprwm/hyprctl`> +Sources at: <*https://github.com/hyprwm/Hyprland*> -AUTHORS -======= +COPYRIGHT +========= -Vaxerski <`https://github.com/vaxerski`> +Copyright (c) 2022, vaxerski From 970bcc467cc4f97c9d985abfae2ffd4b9c6f0a03 Mon Sep 17 00:00:00 2001 From: Blake Lee Date: Fri, 22 Jul 2022 15:32:56 -0400 Subject: [PATCH 5/5] remove version --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 9e251da2..488005ed 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ PKGS = wlroots wayland-server xcb xkbcommon libinput CFLAGS += $(foreach p,$(PKGS),$(shell pkg-config --cflags $(p))) LDLIBS += $(foreach p,$(PKGS),$(shell pkg-config --libs $(p))) -VERSION=0.7.1beta DATE=$(shell date "+%d %b %Y") xdg-shell-protocol.h: @@ -157,7 +156,6 @@ man: pandoc ./docs/Hyprland.1.rst \ --standalone \ --variable=header:"Hyprland User Manual" \ - --variable=footer:${VERSION} \ --variable=date:"${DATE}" \ --variable=section:1 \ --from rst \ @@ -166,7 +164,6 @@ man: pandoc ./docs/hyprctl.1.rst \ --standalone \ --variable=header:"hyprctl User Manual" \ - --variable=footer:${VERSION} \ --variable=date:"${DATE}" \ --variable=section:1 \ --from rst \