make rotate.sh first class citizen for receiving signal

master
Bel LaPointe 2023-03-24 14:44:47 -06:00
parent bf677856a2
commit cdfcfe8fd0
2 changed files with 9 additions and 15 deletions

View File

@ -23,27 +23,19 @@ See `./config.d/rusty-pipe.d`
## `rusty-pipe`
```bash
INPUT_NAME=udp
INPUT_UDP_PORT=port
```
`INPUT_NAME=udp INPUT_UDP_PORT=port rusty-pipe | ...`
## `mayhem-party`
`cd ./config.d/mayhem-party.d/remap.d; bash ./rotate.sh` and press enter at least once
### Configs
`cd ./config.d/mayhem-party.d/remap.d; bash ./rotate.sh`
> rotate anytime via stdin or `pkill -SIGUSR1 -f rotate.sh`
### Binary
```bash
DEBUG=1
INPUT_KEYBOARD=true
INPUT_REFRESH_ON_SIGUSR1=true
INPUT_REMAP_FILE=/tmp/mayhem-party.d/live
MAIN_INTERVAL_DURATION=5ms
OUTPUT_KEYBOARD=true
```
`... | bash -c 'true; source ./config.d/mayhem-party.d/env.env; mayhem-party'`
## Game Playing
@ -51,5 +43,5 @@ Foreground
## `stt`
TODO pipe stt detecting relevant strings -> change the `/tmp/mayhem-party.d/live` link -> `SIGUSR1` to `mayhem-party`
TODO pipe stt detecting relevant strings -> change the `./config.d/mayhem-party.d/remap.d/live.yaml` link -> `SIGUSR1` to `mayhem-party`

View File

@ -11,6 +11,8 @@ mayhem_party_rotate() {
pkill -SIGUSR1 -f mayhem-party
}
trap mayhem_party_rotate SIGUSR1
if [ "$0" == "$BASH_SOURCE" ]; then
NEXT=0 mayhem_party_rotate
while read -p "$(date) > [press enter to rotate]"; do