Commit Graph

167 Commits (f970c5ceb7e85413c6c2dd718b873525f46d159d)

Author SHA1 Message Date
Andri Yngvason 15660cd4a7 keyboard: Pass keyboard LED state to client 2024-04-07 12:31:34 +00:00
Andri Yngvason 54fb881aab util: Add ALIGN_UP macro 2024-03-16 16:46:14 +00:00
Andri Yngvason 5d55944dab ctl: Emit event when output is added/removed 2024-02-11 22:17:50 +00:00
Andri Yngvason 42494fbbe4 ctl: Replace hostname with IP address 2023-12-31 18:06:35 +00:00
Consolatis ac907a07f3 Add wlr-output-management protocol 2023-11-19 21:01:45 +00:00
Andri Yngvason 27a8008edf Emit "detached" control event 2023-11-19 20:47:39 +00:00
Andri Yngvason 9647d1089a Implement detached mode
This makes it possible to attach to a compositor at a later time and to
detach and re-attach.
2023-11-19 20:47:39 +00:00
Andri Yngvason 6d59ab8323 Add config option to make paths relative to config file 2023-09-29 21:53:29 +00:00
Andri Yngvason f2c367f191 Use new Neat VNC authentication API 2023-09-29 21:53:29 +00:00
Andri Yngvason 8395f7b106 Add config parameter for RSA private key file 2023-09-29 21:53:29 +00:00
MazTheMan ec885cf23d get pixel size from fourcc to calculate pixel stride 2023-09-29 21:48:01 +00:00
Andri Yngvason c01e5c6080 seat: Add occupancy count 2023-04-29 19:48:30 +00:00
Andri Yngvason 87c034db43 Add seat name to client-connected event 2023-04-29 19:35:24 +00:00
Andri Yngvason d53a04b5b0 Remove unnecessary copying when listing clients 2023-04-29 19:35:24 +00:00
Andri Yngvason 51f868c6ff Iterate over clients instead of listing
This model avoids memory allocations and allows for re-use of
the info function for client events.
2023-04-29 19:35:24 +00:00
Andri Yngvason 1c9a8c0769 Show seat in client list 2023-04-29 19:35:24 +00:00
Jim Ramsay 749b64666a Clean up command summary printing
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-12 17:47:50 -05:00
Jim Ramsay 104040291b Add option_parser_print_usage
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-12 17:47:50 -05:00
Jim Ramsay dcb23ebfe1 Add 'schema' to wayvncctl command parameters
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-12 17:47:50 -05:00
Jim Ramsay 405e9a13df Add help output for wayvncctl positional arguments
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-12 17:47:50 -05:00
Jim Ramsay a28ce15521 Split wayvnctl output-set into output-set and output-cycle
Rather than optional params, unique commands are easier to use.

This also removes the ability to cycle through in reverse since the list
order is already arbitrary.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-08 18:23:45 -05:00
Jim Ramsay 8df085a65a Rename and reorder all wayvncctl commands
This introduces a better hierarchical naming convention for IPC
commands.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-08 13:51:10 -05:00
Jim Ramsay d1e1f62d1e Refactor option-parser table printing code for reuse
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-08 12:42:38 -05:00
Jim Ramsay 522b1deb28 Convert wayvncctl subcommands to use option-parser
Also cleans up access to unparsed options.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-02 16:38:46 -05:00
Andri Yngvason 474ce23d42 Implement custom option parser 2023-01-01 09:12:29 +00:00
Jim Ramsay 3e5d6ea8eb Fix segfault after hot-plugging outputs
When new outputs appear, either because they were just created or
because they have been disabled/reenabled, ensure we always set up the
right xdg_output and wlr_output_power listeners.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-19 16:20:56 -05:00
Jim Ramsay 00539935ba Add output power state to get_outputs ipc command
I forgot to plumb this through when I did the initial state on the
output power state.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 19:56:37 -05:00
Jim Ramsay cb116cc980 Handle all wayvncctl help commands locally
This means that wayvncctl can now provide full descriptions of all
commands and events without wayvnc running.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 19:56:06 -05:00
Jim Ramsay d75ca4bf51 Refactor comand and event name parsing
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 19:56:06 -05:00
Jim Ramsay 4def8f3cb8 Switch wayvncctl to use option_parser
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 19:56:06 -05:00
Jim Ramsay 6b44a6648e Turn output power on when starting capture
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-01 19:11:32 +00:00
Jim Ramsay 308308b63a Add power management state to the output object
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-01 19:11:32 +00:00
Andri Yngvason 312ddd8960 Move control command schemas into own files
This allows them to be used by ctl-client as well.
2022-11-27 10:48:03 +00:00
Jim Ramsay e958b06e44 Add wayvncctl wayvnc-exit command
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Jim Ramsay 467cfa1889 Add wayvncctl capture-changed event
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Jim Ramsay 5c8014d19b Add wayvncctl disconnect-client command
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Jim Ramsay 80fd6b074e Add wayvncctl get-outputs command
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Jim Ramsay 19e3d78d78 Add wayvncctl get-clients command
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-23 09:41:46 +00:00
Jim Ramsay 1d25535e7a Add wayvncctl --reconnect option
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-18 09:24:31 +00:00
Jim Ramsay 6e13974b27 Add wayvncctl --wait option
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-18 09:24:31 +00:00
Andri Yngvason 125121613e Create option parser interface
This is an interface that combines option parsing with help text formatting.
2022-11-13 15:43:50 +00:00
Jim Ramsay d8239109e5 Introduce an event loop mode in wayvncctl
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-12 20:11:00 +00:00
Jim Ramsay c75b64eae8 Add server event infrastructure
Includes "client-connect" and "client-disconnect" events as
proof-of-concept.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-12 20:11:00 +00:00
Jim Ramsay 8d32dfaead Add jsonipc event message constructor
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-12 20:11:00 +00:00
Jim Ramsay 01bd225247 Add wayvncctl human-readable output
Also adds the '--json' option to produce machine-readable output.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay be42c8b7bf Add ctl-client code
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay 5043f8e149 Refactor some common utilities out of main
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay 1a0e8aae97 Add ctl control socket and initial command infrastructure
This implements the first wayvncctl command: set-output

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay 19e1e14eab Add json-ipc message plumbing
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay 4018c698c2 Add output_cycle to get next/prev outputs
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-06 14:55:38 +00:00