More consistent scoping in commands section in Manpages

This commit is contained in:
Keith Hall 2023-02-10 06:12:04 +02:00 committed by Martin Nordholts
parent 2ac584dd72
commit 5e77ca37e8
3 changed files with 98 additions and 48 deletions

View File

@ -185,15 +185,16 @@ contexts:
push: command-line-option-or-pipe
commands-start:
- match: '^[ ]{7}(?=.*(?:[ ]<|[|]))'
- match: (?=^[ ]{7}.*(?:[ ]<|[|]))
push: commands
commands:
- match: '[-\w]+'
scope: entity.name.command.man
- match: '^[ ]{7}([a-z_\-]+)(?=[ ]|$)'
captures:
1: entity.name.command.man
push: expect-parameter
- match: '^[ ]{7}(?=[\[<]|\w+[|\]])'
push: expect-parameter
- match: $
pop: true
environment-variables:
- match: '^[ ]{7}([A-Z_]+)\b'

View File

@ -210,6 +210,55 @@ COMMANDS
wordexp(3) for details). The same include file can only be included
once; subsequent attempts will be ignored.
The following commands cannot be used directly in the configuration
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - variable - entity
file. They are expected to be used with bindsym or at runtime through
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - variable - entity
swaymsg(1).
border none|normal|csd|pixel [<n>]
Set border style for focused window. normal includes a border of
thickness n and a title bar. pixel is a border without title bar n
pixels thick. Default is normal with border thickness 2. csd is
short for client-side-decorations, which allows the client to draw
its own decorations.
border toggle
# ^^^^^^ entity.name.command
Cycles through the available border styles.
exit
# ^^^^ entity.name.command
Exit sway and end your Wayland session.
floating enable|disable|toggle
Make focused view floating, non-floating, or the opposite of what
it is now.
<criteria> focus
# ^ punctuation.definition.generic.begin
# ^^^^^^^^ variable.parameter
# ^ punctuation.definition.generic.end
# ^^^^^ variable.parameter
Moves focus to the container that matches the specified criteria.
gaps inner|outer|horizontal|vertical|top|right|bottom|left all|current
set|plus|minus|toggle <amount>
# ^^^ variable.parameter
# ^ keyword.operator.logical
Changes the inner or outer gaps for either all workspaces or the
current workspace. outer gaps can be altered per side with top,
right, bottom, and left or per direction with horizontal and verti
cal.
layout toggle [split|tabbed|stacking|splitv|splith]
[split|tabbed|stacking|splitv|splith]...
# ^ punctuation.section.brackets.begin
# ^^^^^ variable.parameter
# ^ keyword.operator.logical
Cycles the layout mode of the focused container through a list of
layouts.
SEE ALSO
The systemd Homepage[11], systemd-system.conf(5), locale.conf(5)
# ^^^^^^^^^^^^^^^^^^^ entity.name.function

View File

@ -102,17 +102,17 @@
 short for client-side-decorations, which allows the client to draw
 its own decorations.
 border toggle
 border toggle
 Cycles through the available border styles.
 exit
 exit
 Exit sway and end your Wayland session.
 floating enable|disable|toggle
 Make focused view floating, non-floating, or the opposite of what
 it is now.
 <criteria> focus
 <criteria> focus
 Moves focus to the container that matches the specified criteria.
 focus up|right|down|left
@ -124,10 +124,10 @@
 tainer will be focused. The sibling option indicates not to immedi
 ately focus a child of the container.
 focus child
 focus child
 Moves focus to the last-focused child of the focused container.
 focus parent
 focus parent
 Moves focus to the parent of the focused container.
 focus output up|right|down|left
@ -136,13 +136,13 @@
 focus output <name>
 Moves focus to the named output.
 focus tiling
 focus tiling
 Sets focus to the last focused tiling container.
 focus floating
 focus floating
 Sets focus to the last focused floating container.
 focus mode_toggle
 focus mode_toggle
 Moves focus between the floating and tiled layers.
 fullscreen [enable|disable|toggle] [global]
@ -152,7 +152,7 @@
 outputs.
 gaps inner|outer|horizontal|vertical|top|right|bottom|left all|current
 set|plus|minus|toggle <amount>
 set|plus|minus|toggle <amount>
 Changes the inner or outer gaps for either all workspaces or the
 current workspace. outer gaps can be altered per side with top,
 right, bottom, and left or per direction with horizontal and verti
@ -189,7 +189,7 @@
 cles through every layout.
 layout toggle [split|tabbed|stacking|splitv|splith]
 [split|tabbed|stacking|splitv|splith]...
 [split|tabbed|stacking|splitv|splith]...
 Cycles the layout mode of the focused container through a list of
 layouts.
@ -230,7 +230,7 @@
 the position is relative to all outputs. absolute can not be used
 with percentage points.
 move [absolute] position center
 move [absolute] position center
 Moves the focused container to be centered on the workspace. If ab
 solute is used, it is moved to the center of all outputs.
@ -241,7 +241,7 @@
 Moves the focused container to the specified mark.
 move [--no-auto-back-and-forth] [container|window] [to] workspace [num
 ber] <name>
 ber] <name>
 Moves the focused container to the specified workspace. The string
 number is optional and is used to match a workspace with the same
 number, even if it has a different name.
@ -288,14 +288,14 @@
 iour. The optional comment argument is ignored, but logged for de
 bugging purposes.
 reload
 reload
 Reloads the sway config file and applies any changes. The config
 file is located at path specified by the command line arguments
 when started, otherwise according to the priority stated in
 sway(1).
 rename workspace [<old_name>] to <new_name>
 Rename either <old_name> or the focused workspace to the <new_name>
 Rename either <old_name> or the focused workspace to the <new_name>
 resize shrink|grow width|height [<amount> [px|ppt]]
 Resizes the currently focused container by amount, specified in
@ -322,7 +322,7 @@
 If width or height is 0, the container will not be resized on that
 axis.
 scratchpad show
 scratchpad show
 Shows a window from the scratchpad. Repeatedly using this command
 will cycle through the windows in the scratchpad.
@ -344,13 +344,13 @@
 specified, the current container is split opposite to the parent
 container's layout.
 splith
 splith
 Equivalent to split horizontal
 splitv
 splitv
 Equivalent to split vertical
 splitt
 splitt
 Equivalent to split toggle
 sticky enable|disable|toggle
@ -392,25 +392,25 @@
 The default format is "%title".
 The following commands may be used either in the configuration file or
 at runtime.
 at runtime.
 assign <criteria> [→] [workspace] [number] <workspace>
 Assigns views matching criteria (see CRITERIA for details) to
 workspace. The → (U+2192) is optional and cosmetic. This command is
 equivalent to:
 for_window <criteria> move container to workspace <workspace>
 for_window <criteria> move container to workspace <workspace>
 assign <criteria> [→] output left|right|up|down|<name>
 Assigns views matching criteria (see CRITERIA for details) to the
 specified output. The → (U+2192) is optional and cosmetic. This
 command is equivalent to:
 for_window <criteria> move container to output <output>
 for_window <criteria> move container to output <output>
 bindsym [--whole-window] [--border] [--exclude-titlebar] [--release]
 [--locked] [--to-code] [--input-device=<device>] [--no-warn] [--no-re
 peat] [Group<1-4>+]<key combo> <command>
 bindsym [--whole-window] [--border] [--exclude-titlebar] [--release]
 [--locked] [--to-code] [--input-device=<device>] [--no-warn] [--no-re
 peat] [Group<1-4>+]<key combo> <command>
 Binds key combo to execute the sway command command when pressed.
 You may use XKB key names here (wev(1) is a good tool for discover
 ing these). With the flag --release, the command is executed when
@ -478,11 +478,11 @@
 bindcode [--whole-window] [--border] [--exclude-titlebar] [--re
 lease] [--locked] [--input-device=<device>] [--no-warn]
 [Group<1-4>+]<code> <command> is also available for binding with
 [Group<1-4>+]<code> <command> is also available for binding with
 key/button codes instead of key/button names.
 bindswitch [--locked] [--no-warn] [--reload] <switch>:<state> <command>
 Binds <switch> to execute the sway command command on state
 Binds <switch> to execute the sway command command on state
 changes. Supported switches are lid (laptop lid) and tablet (tablet
 mode) switches. Valid values for state are on, off and toggle.
 These switches are on when the device lid is shut and when tablet
@ -511,7 +511,7 @@
 bindswitch lid:toggle exec echo "Lid moved"
 bindgesture [--exact] [--input-device=<device>] [--no-warn] <ges
 ture>[:<fingers>][:directions] <command>
 ture>[:<fingers>][:directions] <command>
 Binds gesture to execute the sway command command when detected.
 Currently supports the hold, pinch or swipe gesture. Optionally can
 be limited to bind to a certain number of fingers or, for a pinch
@ -561,10 +561,10 @@
 bindgesture pinch:inward+left move left
 bindgesture pinch:inward+right move right
 client.background <color>
 client.background <color>
 This command is ignored and is only present for i3 compatibility.
 client.<class> <border> <background> <text> [<indicator> [<child_bor
 client.<class> <border> <background> <text> [<indicator> [<child_bor
 der>]]
 Configures the color of window borders and title bars. The first
 three colors are required. When omitted indicator will use a sane
@ -692,7 +692,7 @@
 to workspace, focus will wrap like in the yes case and additionally
 wrap when moving outside of workspaces boundaries. Default is yes.
 font [pango:]<font>
 font [pango:]<font>
 Sets font to use for the title bars. To enable support for pango
 markup, preface the font name with pango:. For example, monospace
 10 is the default font. To enable support for pango markup,
@ -734,15 +734,15 @@
 bottom, and left or per direction with horizontal and vertical.
 This affects new workspaces only, and is used when the workspace
 doesn't have its own gaps settings (see: workspace <ws> gaps ...).
 doesn't have its own gaps settings (see: workspace <ws> gaps ...).
 hide_edge_borders [--i3] none|vertical|horizon
 tal|both|smart|smart_no_gaps
 tal|both|smart|smart_no_gaps
 Hides window borders adjacent to the screen edges. Default is none.
 The --i3 option enables i3-compatible behavior to hide the title
 bar on tabbed and stacked containers with one child. The
 smart|smart_no_gaps options are equivalent to setting smart_borders
 smart|no_gaps and hide_edge_borders none.
 smart|smart_no_gaps options are equivalent to setting smart_borders
 smart|no_gaps and hide_edge_borders none.
 input <input_device> <input-subcommands...>
 For details on input subcommands, see sway-input(5).
@ -754,7 +754,7 @@
 seat <seat> <seat-subcommands...>
 For details on seat subcommands, see sway-input(5).
 kill
 kill
 Kills (closes) the currently focused container and all of its chil
 dren.
@ -793,7 +793,7 @@
 output.
 no_focus <criteria>
 Prevents windows matching <criteria> from being focused automati
 Prevents windows matching <criteria> from being focused automati
 cally when they're created. This has no effect on the first window
 in a workspace.
@ -849,25 +849,25 @@
 right side.
 unbindswitch <switch>:<state>
 Removes a binding for when <switch> changes to <state>.
 Removes a binding for when <switch> changes to <state>.
 unbindgesture [--exact] [--input-device=<device>] <gesture>[:<fin
 gers>][:directions]
 Removes a binding for the specified gesture, fingers and directions
 combination.
 unbindsym [--whole-window] [--border] [--exclude-titlebar] [--release]
 [--locked] [--to-code] [--input-device=<device>] <key combo>
 unbindsym [--whole-window] [--border] [--exclude-titlebar] [--release]
 [--locked] [--to-code] [--input-device=<device>] <key combo>
 Removes the binding for key combo that was previously bound with
 the given flags. If input-device is given, only the binding for
 that input device will be unbound.
 unbindcode [--whole-window] [--border] [--exclude-titlebar] [--re
 lease] [--locked] [--input-device=<device>] <code> is also avail
 lease] [--locked] [--input-device=<device>] <code> is also avail
 able for unbinding with key/button codes instead of key/button
 names.
 unmark [<identifier>]
 unmark [<identifier>]
 unmark will remove identifier from the list of current marks on a
 window. If identifier is omitted, all marks are removed.
@ -898,11 +898,11 @@
 workspace prev_on_output|next_on_output
 Switches to the next workspace on the current output.
 workspace back_and_forth
 workspace back_and_forth
 Switches to the previously focused workspace.
 workspace <name> gaps inner|outer|horizontal|vertical|top|right|bot
 tom|left <amount>
 tom|left <amount>
 Specifies that workspace name should have the given gaps settings
 when it is created.