Clarify the various wayvncctl 'help' modes

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
pull/178/head
Jim Ramsay 2022-11-05 22:42:24 -04:00 committed by Andri Yngvason
parent 01bd225247
commit 231a08ce19
3 changed files with 40 additions and 19 deletions

View File

@ -296,6 +296,7 @@ static void print_help(json_t* data)
json_string_value(param_value)); json_string_value(param_value));
} }
} }
printf("\nRun 'wayvncctl --help' for allowed Options\n");
} }
} }

View File

@ -46,10 +46,11 @@ static int wayvncctl_usage(FILE* stream, int rc)
static const char* usage = static const char* usage =
"Usage: wayvncctl [options] [command [--param1=value1 ...]]\n" "Usage: wayvncctl [options] [command [--param1=value1 ...]]\n"
"\n" "\n"
"Connects to and interacts with a running wauvnc instance." "Connects to and interacts with a running wayvnc instance."
"\n" "\n"
"Try the \"help\" command for a list of available commands.\n" "Try 'wayvncctl help' for a list of available commands.\n"
"\n" "\n"
"Options:\n"
" -S,--socket=<path> Wayvnc control socket path.\n" " -S,--socket=<path> Wayvnc control socket path.\n"
" -j,--json Output json on stdout.\n" " -j,--json Output json on stdout.\n"
" Default: $XDG_RUNTIME_DIR/wayvncctl\n" " Default: $XDG_RUNTIME_DIR/wayvncctl\n"

View File

@ -2,7 +2,7 @@ wayvncctl(1)
# NAME # NAME
wayvncctl - A control client for wayvnc(1) wayvncctl - A command line control lient for wayvnc(1)
# SYNOPSIS # SYNOPSIS
@ -24,7 +24,8 @@ wayvncctl - A control client for wayvnc(1)
Be more verbose. Be more verbose.
*-h, --help* *-h, --help*
Get help. Get help about the wayvncctl command itself (lists these options). Does
not connect to the wayvncctl control socket.
# DESCRIPTION # DESCRIPTION
@ -32,12 +33,18 @@ wayvncctl - A control client for wayvnc(1)
This command line utility provides easy interaction with those commands. This command line utility provides easy interaction with those commands.
For a full list of currently supported commands, see For a full list of currently supported commands, see
*wayvnc(1)* section _IPC COMMANDS_, or use the *wayvnc(1)* section _IPC COMMANDS_, or run the
*wayvncctl help* command. *wayvncctl help* command.
Running *wayvncctl help* contacts the server over the control socket and returns
a list of the available commands.
Running *wayvncctl command-name --help* returns a description of the server-side
command and its available parameters.
# EXAMPLES # EXAMPLES
Query the server for all available command names: Query the server for all available IPC command names:
``` ```
$ wayvncctl help $ wayvncctl help
@ -49,23 +56,35 @@ Allowed commands:
Run 'wayvncctl command-name --help' for command-specific details. Run 'wayvncctl command-name --help' for command-specific details.
``` ```
Get help on the "help" command: Get help on the "set-output" IPC command:
``` ```
$ wayvncctl help --help $ wayvncctl set-output --help
Usage: wayvncctl [options] help [params] Usage: wayvncctl [options] set-output [params]
List all commands, or show usage of a specific command Switch the actively captured output
Parameters: Parameters:
--command=... --switch-to=...
The command to show (optional) The specific output name to capture
--cycle=...
Either "next" or "prev"
Run 'wayvncctl --help' for allowed options
``` ```
Cycle to the next active output: Cycle to the next active output:
``` ```
$ wayvncctl set-output --cycle=forward $ wayvncctl set-output --cycle=next
```
Get json-formatted version information:
```
$ wayvncctl --json version
{"wayvnc":"v0.5.0","neatvnc":"v0.5.1","aml":"v0.2.2"}
``` ```
# ENVIRONMENT # ENVIRONMENT