Separate OBS retry/queue logic (Obs) from ops (OpRunner).

This commit is contained in:
2023-10-22 10:45:04 -04:00
parent 917af288ab
commit ee173f7eae
8 changed files with 269 additions and 157 deletions

View File

@@ -2,12 +2,12 @@
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
Send a D-Bus signal to perform an operation with `src/obsdc-signal`, which takes a single operation name
as an argument.
## Operations
See [src/main/kotlin/net/eksb/obsdc/Op] for a list of operations.
See [Op](src/main/kotlin/net/eksb/obsdc/Op.kt) for a list of operations.
## Configuration
@@ -33,7 +33,16 @@ Configuration is in `$XDG_CONFIG_HOME/net.eksb.obsdc/config.properties`
## Code
Start reading [src/main/kotlin/net/eksb/obsdc/Main].
Start at [Main](src/main/kotlin/net/eksb/obsdc/Main.kt).
[Obs](src/main/kotlin/net/eksb/obsdc/Obs.kt) is a wrapper around
[obs-websocket-java](https://github.com/obs-websocket-community-projects/obs-websocket-java)
that handles reconnects and queuing operations until the websocket it ready.
[OpRunner](src/main/kotlin/net/eksb/obsdc/OpRunner.kt) has the logic to run [Op](src/main/kotlin/net/eksb/obsdc/Op.kt)s
using an `Obs`.
[DBus](src/main/kotlin/net/eksb/obsdc/DBus.kt) listens for the `D-Bus` signals and calls `OpRunner`.
## History/Rationale
@@ -45,4 +54,4 @@ My [window manager](https://swaywm.org/) is configured to call `obsdc-signal` wi
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 have visible) the OBS window.
So now I can quickly control what people can see without having to focus (or even make visible) the OBS window.