less sudo and 2 virtual devices

master
bel 2023-04-02 11:40:10 -06:00
parent 42212e3d10
commit 78b00ac62a
4 changed files with 41 additions and 31 deletions

View File

@ -4,8 +4,8 @@ feedback:
users: users:
bel: bel:
meta: meta:
lasttsms: 1680454187304 lasttsms: 1680371007738
lastlag: 103 lastlag: 0
state: state:
player: 1 player: 1
message: "" message: ""
@ -26,17 +26,17 @@ users:
vote: "" vote: ""
players: players:
- transformation: - transformation:
"1": "6" "1": "6" # a
"2": "7" "2": "7" # b
"3": "8" "3": "8" # x
"4": "9" "4": "9" # y
"5": "0" "5": "0" # start
a: f a: f # stickLeft
d: h d: h # stickRight
e: "y" e: "y" # r
q: r q: r # l
s: g s: g # stickDown
w: t w: t # stickUp
quiet: false quiet: false
broadcast: broadcast:
message: "" message: ""

@ -1 +1 @@
Subproject commit 342e2eef93f3d772b7e1eda7feaaf0852534bd53 Subproject commit 934158b7a3adbf81cc24baaf1ed050076e6046b7

@ -1 +1 @@
Subproject commit 324a7b07b0dfcc1373b28a7f85a5d2ea070caec2 Subproject commit 31bdb6d92e40103c4be000f46ebcf5d2e2ff5920

View File

@ -36,11 +36,15 @@ log() {
} }
_discord() { _discord() {
echo
read -p "pls start discord" read -p "pls start discord"
echo
} }
_dolphin() { _dolphin() {
echo
read -p "pls start dolphin" read -p "pls start dolphin"
echo
} }
_mayhem_party() { _mayhem_party() {
@ -81,28 +85,34 @@ _stt() {
| awk "{print \$NF}" \ | awk "{print \$NF}" \
| head -n 1 | head -n 1
) )
( if ! test -f /etc/asound.conf || ! grep "$device" /etc/asound.conf; then
echo "pcm.pulse_monitor {" (
echo " type pulse" echo "pcm.pulse_monitor {"
echo " device $device" echo " type pulse"
echo "}" echo " device $device"
echo "ctl.pulse_monitor {" echo "}"
echo " type pulse" echo "ctl.pulse_monitor {"
echo " device $device" echo " type pulse"
echo "}" echo " device $device"
) | sudo tee /etc/asound.conf echo "}"
) | sudo tee /etc/asound.conf
fi
for i in $(pactl list short modules | grep secret | cut -f1); do for i in $(pactl list short modules | grep secret | cut -f1); do
pactl unload-module $i pactl unload-module $i
done done
name='my_secret_sink' name='my_secret_sink'
if ! pactl list | grep -q $name; then for i in 1 2; do
pactl load-module module-null-sink sink_name=$name channels=1 if ! pactl list | grep -q $name$i; then
pactl load-module module-remap-source master=$name.monitor source_name=shared-$name source_properties="device.description=shared-$name" #channels=1 pactl load-module module-null-sink sink_name=$name$i channels=1
mic_name="$(pactl list | grep -A 100 Name:.$name.monitor | grep device.description.=. | head -n 1 | sed 's/.* = //' | tr -d '"') Monitor" pactl load-module module-remap-source master=$name$i.monitor source_name=shared-$name$i source_properties="device.description=shared-$name$i"
fi mic_name="$(pactl list | grep -A 100 Name:.$name$i.monitor | grep device.description.=. | head -n 1 | sed 's/.* = //' | tr -d '"') Monitor"
fi
done
read -p "pavucontrol to change input to $mic_name, ok? " echo
read -p "pavucontrol to change input to $name, ok? "
echo
log launching stt log launching stt
( (
export HOTWORDS=../../config.d/mayhem-party.d/v01-live.yaml@.users[].state.gm.alias export HOTWORDS=../../config.d/mayhem-party.d/v01-live.yaml@.users[].state.gm.alias