diff --git a/.gitignore b/.gitignore index 2040c29..b028b8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ zig-cache +*.1 diff --git a/doc/river.1 b/doc/river.1 deleted file mode 100644 index 3f72980..0000000 --- a/doc/river.1 +++ /dev/null @@ -1,41 +0,0 @@ -.TH RIVER 1 2020-06-04 github.com/ifreund/river "General Commands Manual" - -.SH NAME -river \- dynamic tiling Wayland compositor - -.SH SYNOPSIS -.BR river " [" -c -.IR shell_command ] - -.SH DESCRIPTION -.B river -is a dynamic tiling Wayland compositor inspired by dwm and bspwm -based on wlroots and written in Zig. - -.SH OPTIONS - -.TP -.BI -c " shell_command" -Run a shell command or give the path to a script -that will be run before river gets started. -This is where you define keymaps using -.BR riverctl (1) -and autostart programs. -Make sure the script is executable. - -.SH CONFIGURATION -View border width, gap sizes, and programs which should float are configured in -.IR Config.zig . -Make your changes and recompile. - -.PP -Experimental XWayland support can be enabled on compile-time with the -.I -Dxwayland=true -flag. - -Keyboard layout and other XKB options can be set in -.IR Keyboard.zig . - -.SH SEE ALSO - -.BR riverctl "(1), " bspwm "(1), " dwm (1) diff --git a/doc/river.1.scd b/doc/river.1.scd new file mode 100644 index 0000000..bc04b06 --- /dev/null +++ b/doc/river.1.scd @@ -0,0 +1,35 @@ +RIVER(1) "github.com/ifreund/river" "General Commands Manual" +# NAME + +river - dynamic tiling Wayland compositor + +# SYNOPSIS + +*river* [*-c* _shell_command_] + +# DESCRIPTION + +*river* is a dynamic tiling Wayland compositor inspired by dwm and +bspwm based on wlroots and written in Zig. + +# OPTIONS + +*-c* _shell_command_ + Run a shell command or give the path to a script that will be run + before river gets started. This is where you define keymaps using + *riverctl*(1) and autostart programs. Make sure the script is + executable. + +# CONFIGURATION + +View border width, gap sizes, and programs which should float are +configured in _Config.zig_. Make your changes and recompile. + +Experimental XWayland support can be enabled on compile-time with the +_-Dxwayland=true_ flag. + +Keyboard layout and other XKB options can be set in _Keyboard.zig_. + +# SEE ALSO + +*riverctl*(1), *bspwm*(1), *dwm*(1) diff --git a/doc/riverctl.1 b/doc/riverctl.1 deleted file mode 100644 index cd267ae..0000000 --- a/doc/riverctl.1 +++ /dev/null @@ -1,195 +0,0 @@ -.TH RIVERCTL 1 2020-06-03 github.com/ifreund/river "General Commands Manual" - -.SH NAME -riverctl \- command-line interface for controlling river - -.SH SYNOPSIS -.BR riverctl " " close | declare-mode | enter-mode | exit | focus-output | focus-view | layout | map | mod-master-count | mod-master-factor | send-to-output | set-focused-tags | set-view-tags | spawn | toggle-float | toggle-focused-tags | toggle-view-tags | zoom -.RI [ "command specific arguments" ] - -.SH DESCRIPTION -.B riverctl -is a command-line interface inspired by bspc from bspwm used to control and configure river. - -.SH COMMANDS -.SS ACTIONS - -.TP -.B close -Close the focused view. - -.TP -.B exit -Exit the compositor, terminating the Wayland session. - -.TP -.B focus-output \c -.BR next | previous -Focus next or previous output. - -.TP -.B focus-view \c -.BR next | previous -Focus next or previous view in the stack. - -.TP -.B layout \c -.BR top-master | right-master | bottom-master | left-master | full -Change the view layout. - -.TP -.BI mod-master-count " integer" -Increase or decrease the number of master views. -.I integer -can be positive or negative. - -.TP -.BI mod-master-factor " float" -Make the master area bigger or smaller. -.I float -is a positive or negative floating point number (such as 0.05) -where 1 corresponds to the whole screen. - -.TP -.B send-to-output \c -.BR next | previous -Send the focused view to the next or the previous output. - -.TP -.BI spawn " shell_command" -Run -.I shell_command -using -.IR "/bin/sh -c" . -Put single quotes around -.I shell_command -if you do not want special characters to get interpreted by your shell -before the command gets passed to -.IR /bin/sh . - -.TP -.B toggle-float -If the focused view is floating, make it tiled. -If it is tiled, make it floating. - -.TP -.B zoom -Bump the focused view to the top of the layout stack to make it the new master. - -.SS ACTIONS ON TAGS -Tags are like workspaces but more flexible: -You can assign views to multiple tags and look at multiple tags at once. -A -.I tagmask -is used to represent which tags are visible. -The following commands take a -.I tagmask -in base 10 as argument but -.I tagmasks -are best understood in binary: -000000001 means that the first tag is visible; -111111111 means that tag 1 through 9 are visible. - -.TP -.BI set-focused-tags " tagmask" -Show the tags specified with -.IR tagmask . - -.TP -.BI set-view-tags " tagmask" -Assign focused view to tags specified with -.IR tagmask . - -.TP -.BI toggle-focused-tags " tagmask" -Toggle visibility of tags specified with -.IR tagmask . - -.TP -.BI toggle-view-tags " tagmask" -Toggle tags of focused view as specified with -.IR tagmask . - -.SS CONFIGURATION COMMANDS - -.TP -.BI declare-mode " name" -Create a new mode called -.I name -for use in mappings. - -.TP -.BI enter-mode " name" -Switch to given mode if it exits. - -.TP -.B map \c -.I mode modifiers key command -.I mode -is either -.B normal -(the default mode) or a mode created with -.BR declare-mode . -.I modifiers -is a list of one or more of the following modifiers separated with a plus sign: -.IP \(bu -Shift -.IP \(bu -Lock (Caps lock) -.IP \(bu -Control (Ctrl) -.IP \(bu -Mod (Alt) -.IP \(bu -Mod2 -.IP \(bu -Mod3 -.IP \(bu -Mod4 (Super, Logo, Windows) -.IP \(bu -Mod5 - -.I key -is an XKB key name. See -.I /usr/include/xkbcommon/xkbcommon-keysyms.h -for a list of special key names. -.I command -can be any of the above commands. - -A mapping without modifiers can be created by passing an empty string as the -modifiers argument. - -.TP -.B set-option \c -.I option value -Set -.I option -to a specified -.IR value . -List of valid options: -.IP \(bu -border_width (non-negative integer) -.IP \(bu -border_color_focused (RGB/RGBA hex code) -.IP \(bu -border_color_unfocused (RGB/RGBA hex code) -.IP \(bu -outer_padding (non-negative integer) -.IP \(bu -view_padding (non-negative integer) - -.SH EXAMPLES - -Bind bemenu-run to Super+P: - -.RS 4 -riverctl map normal Mod4 P spawn bemenu-run -.RE - -See -.I contrib/config.sh -for some basic keybindings. - -.SH SEE ALSO - -.BR river "(1), " bspc (1) diff --git a/doc/riverctl.1.scd b/doc/riverctl.1.scd new file mode 100644 index 0000000..d5fe7ee --- /dev/null +++ b/doc/riverctl.1.scd @@ -0,0 +1,130 @@ +RIVERCTL(1) "github.com/ifreund/river" "General Commands Manual" +# NAME + +riverctl - command-line interface for controlling river + +# SYNOPSIS + +*riverctl* *close*|*declare-mode*|*enter-mode*|*exit*|*focus-output*| +*focus-view*|*layout*|*map*|*mod-master-count*|*mod-master-factor*| +*send-to-output*|*set-focused-tags*|*set-view-tags*|*spawn*|*toggle-float*| +*toggle-focused-tags*|*toggle-view-tags*|*zoom* [_command specific arguments_] + +# DESCRIPTION + +*riverctl* is a command-line interface inspired by bspc from bspwm +used to control and configure river. + +# COMMANDS + +## ACTIONS + +*close* + Close the focused view. + +*exit* + Exit the compositor, terminating the Wayland session. + +*focus-output* *next*|*previous* + Focus next or previous output. + +*focus-view* *next*|*previous* + Focus next or previous view in the stack. + +*layout* *top-master*|*right-master*|*bottom-master*|*left-master*|*full* + Change the view layout. + +*mod-master-count* _integer_ + Increase or decrease the number of master views. _integer_ can be + positive or negative. + +*mod-master-factor* _float_ + Make the master area bigger or smaller. _float_ is a positive or + negative floating point number (such as 0.05) where 1 corresponds to + the whole screen. + +*send-to-output* *next*|*previous* + Send the focused view to the next or the previous output. + +*spawn* _shell_command_ + Run _shell_command_ using _/bin/sh -c_. Put single quotes around + _shell_command_ if you do not want special characters to get + interpreted by your shell before the command gets passed to _/bin/sh_. + +*toggle-float* + If the focused view is floating, make it tiled. If it is tiled, make + it floating. + +*zoom* + Bump the focused view to the top of the layout stack to make it the + new master. + +## ACTIONS ON TAGS + +Tags are like workspaces but more flexible: You can assign views to +multiple tags and look at multiple tags at once. A _tagmask_ is used +to represent which tags are visible. The following commands take a +_tagmask_ in base 10 as argument but _tagmasks_ are best understood in +binary: 000000001 means that the first tag is visible; 111111111 means +that tag 1 through 9 are visible. + +*set-focused-tags* _tagmask_ + Show the tags specified with _tagmask_. + +*set-view-tags* _tagmask_ + Assign focused view to tags specified with _tagmask_. + +*toggle-focused-tags* _tagmask_ + Toggle visibility of tags specified with _tagmask_. + +*toggle-view-tags* _tagmask_ + Toggle tags of focused view as specified with _tagmask_. + +## CONFIGURATION COMMANDS + +*declare-mode* _name_ + Create a new mode called _name_ for use in mappings. + +*enter-mode* _name_ + Switch to given mode if it exits. + +*map* _mode_ _modifiers_ _key_ _command_ + _mode_ is either *normal* (the default mode) or a mode created with + *declare-mode*. _modifiers_ is a list of one or more of the following + modifiers separated with a plus sign: + + - Shift + - Lock (Caps lock) + - Control (Ctrl) + - Mod (Alt) + - Mod2 + - Mod3 + - Mod4 (Super, Logo, Windows) + - Mod5 + + _key_ is an XKB key name. See _/usr/include/xkbcommon/xkbcommon-keysyms.h_ + for a list of special key names. _command_ can be any of the above commands. + + A mapping without modifiers can be created by passing an empty string as + the modifiers argument. + +*set-option* _option_ _value_ + Set _option_ to a specified _value_. List of valid options: + + - *border_width* _non-negative_integer_ + - *border_color_focused* _RGB/RGBA_hex_code_ + - *border_color_unfocused* _RGB/RGBA_hex_code_ + - *outer_padding* _non-negative_integer_ + - *view_padding* _non-negative_integer_ + +# EXAMPLES + +Bind bemenu-run to Super+P: + + riverctl map normal Mod4 P spawn bemenu-run + +See _contrib/config.sh_ for some basic keybindings. + +# SEE ALSO + +*river*(1), *bspc*(1)