diff --git a/README.md b/README.md new file mode 100644 index 0000000..9796db5 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# 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 [src/main/kotlin/net/eksb/obsdc/Op] for a list of operations. + +## Configuration + +Configuration is in `$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) + +## 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 reading [src/main/kotlin/net/eksb/obsdc/Main]. + +## 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](https://www.keebmonkey.com/products/megalodon-dual-layer-knob-macro-pad) with two knobs. +My [window manager](https://swaywm.org/) 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 have visible) the OBS window. \ No newline at end of file diff --git a/src/scripts/obs-signal b/src/main/dist/bin/obsdc-signal similarity index 100% rename from src/scripts/obs-signal rename to src/main/dist/bin/obsdc-signal diff --git a/src/main/kotlin/net/eksb/obsdc/DBus.kt b/src/main/kotlin/net/eksb/obsdc/DBus.kt index 2534d3d..1e28130 100644 --- a/src/main/kotlin/net/eksb/obsdc/DBus.kt +++ b/src/main/kotlin/net/eksb/obsdc/DBus.kt @@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit * * `{OP_NAME}` is the name of an [Op]. * - * `src/scripts/obs-signal` takes an [Op] name and sends the signal. + * `src/scripts/obsdc-signal` takes an [Op] name and sends the signal. */ class DBus(private val q: BlockingQueue): AutoCloseable {