2023-11-10 11:55:38 -05:00
2023-11-10 11:55:38 -05:00
2023-10-20 09:26:38 -04:00
2023-10-20 11:16:12 -04:00
2023-10-22 10:52:47 -04:00
2023-11-10 11:55:38 -05:00

obsdc

OBS control from D-Bus messages

Send a D-Bus signal to perform an operation with src/obsdc-signal, which takes a single operation name as an argument.

Operations

See Op for a list of operations.

Configuration

Configuration is read from $XDG_CONFIG_HOME/net.eksb.obsdc/config.properties

Configuration options

  • host - OBS websocket host (default: localhost)
  • port - OBS websocket port (default: 4455)
  • password - OBS websocket password (required)

systemd

A systemd unit file (obsdc.service) is included.

  1. Copy the file to ~/.config/systemd/user/.
  2. Edit the ExecStart line for where you have installed obsdc.
  3. systemctl --user enable obsdc
  4. systemctl --user start obsdc

Build

gradle build

Run

  1. tar xf build/distributions/obsdc.tar
  2. cd obsdc
  3. Create config file. See [#Configuration].
  4. bin/obsdc
  5. bin/obsdc-signal to send an op.

Code

Start at Main.

Obs is a wrapper around obs-websocket-java that handles reconnects and queuing operations until the websocket it ready.

OpRunner has the logic to run Ops using an Obs.

DBus listens for the D-Bus signals and calls OpRunner.

History/Rationale

I usually code on a 4k monitor in portrait mode. To show what I am doing on video calls, I use OBS to share that monitor, but it is a 2160x4096 source in a 1920x1080 scene.

I have a macropad with two knobs. My window manager is configured to call obsdc-signal with PAN_UP/PAN_DOWN for the keys emitted by one knob and PAN_RIGHT/PAN_LEFT for the keys emitted by the other knob. The regular keys on the macropad are mapped to the other actions.

So now I can quickly control what people can see without having to focus (or even make visible) the OBS window.

Description
No description provided
Readme 105 KiB
Languages
Kotlin 100%