diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-11-08 12:00:47 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-11-08 12:00:47 -0500 |
commit | c2d647a3cb3a6d456684bcdce327954214352959 (patch) | |
tree | 4fe8bf78b9ef868453bb974758856b2c19c20830 /roles/obs/templates | |
parent | 5bf4ab50e13a9be2923ddebe69525b40df8ab3bc (diff) | |
download | emacsconf-ansible-c2d647a3cb3a6d456684bcdce327954214352959.tar.xz emacsconf-ansible-c2d647a3cb3a6d456684bcdce327954214352959.zip |
Update edit and publish configs, tweak OBS, add Mumble client
Diffstat (limited to 'roles/obs/templates')
-rw-r--r-- | roles/obs/templates/Mumble.conf | 78 | ||||
-rw-r--r-- | roles/obs/templates/bashrc | 4 | ||||
-rw-r--r-- | roles/obs/templates/emacsconf-stream-config.el | 2 | ||||
-rwxr-xr-x | roles/obs/templates/mpv-track | 24 | ||||
-rw-r--r-- | roles/obs/templates/mpv.conf | 4 | ||||
-rwxr-xr-x | roles/obs/templates/pulse | 6 | ||||
-rw-r--r-- | roles/obs/templates/scenes.json | 4 | ||||
-rwxr-xr-x | roles/obs/templates/xstartup-track | 1 |
8 files changed, 114 insertions, 9 deletions
diff --git a/roles/obs/templates/Mumble.conf b/roles/obs/templates/Mumble.conf new file mode 100644 index 0000000..06449d4 --- /dev/null +++ b/roles/obs/templates/Mumble.conf @@ -0,0 +1,78 @@ +[General] +lastupdate=2 + +[audio] +echomulti=false +input=PulseAudio +output=PulseAudio +outputdelay=4 +positional=false +transmit=2 +vadmax=@Variant(\0\0\0\x87?z\xe1\xf6) +vadmin=@Variant(\0\0\0\x87?L\xcd\x9a) +whisperfriends=true + +[messages] +10\log=1 +12\log=1 +14\log=1 +15\log=1 +17\log=1 +18\log=1 +19\log=1 +2\log=1 +20\log=1 +21\log=1 +22\log=1 +23\log=1 +25\log=1 +26\log=1 +27\log=1 +28\log=1 +29\log=1 +5\log=1 +6\log=1 +9\log=1 +size=29 + +[messagesounds] +size=29 + +{% if mumble_certificates[item.id] is defined %} +[net] +certificate="{{ mumble_certificates[item.id] }}" +{% endif %} + +[overlay] +blacklist=@Invalid() +blacklistexclude=@Invalid() +launchers=@Invalid() +launchersexclude=@Invalid() +paths=@Invalid() +pathsexclude=@Invalid() +version=1.3.4 +whitelist=@Invalid() +whitelistexclude=@Invalid() + +[pulseaudio] +output={{ item.id }}-qa + +[shortcuts] +1\data=@Invalid() +1\index=1 +1\keys=@Variant(\0\0\0\t\0\0\0\x1\0\0\0\x2\0\0\0`) +1\suppress=false +size=1 + +[tts] +enable=false + +[ui] +ConfigGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0n\0\0\0\x31\0\0\x4\x86\0\0\x2\x61\0\0\0p\0\0\0\x31\0\0\x4\x84\0\0\x2_\0\0\0\0\0\0\0\0\x5\0\0\0\0p\0\0\0\x31\0\0\x4\x84\0\0\x2_) +connect\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x1W\0\0\0\x91\0\0\x3\x98\0\0\x2\0\0\0\x1Y\0\0\0\x91\0\0\x3\x96\0\0\x1\xfe\0\0\0\0\0\0\0\0\x5\0\0\0\x1Y\0\0\0\x91\0\0\x3\x96\0\0\x1\xfe) +connect\header=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2&\0\0\0\x3\x1\x1\0\0\0\0\0\0\x1\0\0\0\x2\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x3\0\0\x1m\0\0\0\x1\0\0\0\x1\0\0\0X\0\0\0\x1\0\0\0\x3\0\0\0\x61\0\0\0\x1\0\0\0\x3\0\0\x3\xe8\0\0\0\0\x64) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x12\0\0\x4\xff\0\0\x2\xcf\0\0\0\x2\0\0\0\x12\0\0\x4\xfd\0\0\x2\xcd\0\0\0\0\0\0\0\0\x5\0\0\0\0\x2\0\0\0\x12\0\0\x4\xfd\0\0\x2\xcd) +header=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x3\xf2\0\0\0\x1\x1\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x1\0\0\x3\xf2\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0\x64) +server={{ mumble_server }} +state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\0\0\0\x1\0\0\0\x2~\xfc\x2\0\0\0\x2\xfb\0\0\0\f\0q\0\x64\0w\0L\0o\0g\x1\0\0\0>\0\0\x2\x61\0\0\0z\0\xff\xff\xff\xfb\0\0\0\xe\0q\0\x64\0w\0\x43\0h\0\x61\0t\x1\0\0\x2\xa3\0\0\0\x19\0\0\0\x19\0\0\0\x19\0\0\x3\xf8\0\0\x2~\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\x1a\0q\0t\0I\0\x63\0o\0n\0T\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0) +usage=false diff --git a/roles/obs/templates/bashrc b/roles/obs/templates/bashrc index 3677017..4d65cbd 100644 --- a/roles/obs/templates/bashrc +++ b/roles/obs/templates/bashrc @@ -112,5 +112,9 @@ if ! shopt -oq posix; then fi fi +alias play=track-mpv +alias qa-louder="pactl set-sink-volume {{ item.id }}-qa +5% " +alias qa-quieter="pactl set-sink-volume {{ item.id }}-qa -5% " +alias qa-vol="pactl set-sink-volume {{ item.id }}-qa " export PATH=$PATH:$HOME/bin export DISPLAY=${DISPLAY:-:{{ item.vnc_id }}} diff --git a/roles/obs/templates/emacsconf-stream-config.el b/roles/obs/templates/emacsconf-stream-config.el index 8770d60..a1a048b 100644 --- a/roles/obs/templates/emacsconf-stream-config.el +++ b/roles/obs/templates/emacsconf-stream-config.el @@ -3,7 +3,7 @@ ;; Configuration (vertico-mode) (fset 'yes-or-no-p 'y-or-n-p) -(modus-themes-load-vivendi) +(modus-themes-load-operandi) (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (shell . t))) (setq backup-directory-alist '(("." . "~/.emacs.d/backups"))) (setq completion-styles '(orderless)) diff --git a/roles/obs/templates/mpv-track b/roles/obs/templates/mpv-track index ee359f1..b6d6d67 100755 --- a/roles/obs/templates/mpv-track +++ b/roles/obs/templates/mpv-track @@ -2,4 +2,26 @@ # Run MPV with the output set to the right sink and with an IPC socket # {{ ansible_managed }} -DISPLAY="${DISPLAY:-:{{ item.vnc_id }}}" mpv --input-ipc-server={{ emacsconf_home }}/mpv-socket-{{ emacsconf_id }}-{{ item.id }} --audio-device=pulse/{{ item.id }}-vid --profile={{ emacsconf_id }}-talks $* & +# Update the overlay +FILE=$1 +if [[ ! -f $FILE ]]; then + FILE="/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm" +fi +shift +SLUG=$(echo "$FILE" | perl -ne 'if (/^emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }') +if [[ -f /data/emacsconf/assets/overlays/$SLUG-other.png ]]; then + echo "Found other overlay for $SLUG, copying" + cp /data/emacsconf/assets/overlays/$SLUG-other.png ~/other.png +else + echo "Could not find /data/emacsconf/assets/overlays/$SLUG-other.png, please override ~/other.png manually" + cp /data/emacsconf/assets/overlays/blank-other.png ~/other.png +fi +if [[ -f /data/emacsconf/assets/overlays/$SLUG-video.png ]]; then + echo "Found video overlay for $SLUG, copying" + cp /data/emacsconf/assets/overlays/$SLUG-video.png ~/video.png +else + echo "Could not find /data/emacsconf/assets/overlays/$SLUG-video.png, override ~/video.png manually" + cp /data/emacsconf/assets/overlays/blank-video.png ~/video.png +fi +# Play the video +DISPLAY="${DISPLAY:-:{{ item.vnc_id }}}" mpv --input-ipc-server={{ emacsconf_home }}/mpv-socket-{{ emacsconf_id }}-{{ item.id }} --audio-device=pulse/{{ item.id }}-vid --profile={{ emacsconf_id }}-talks $FILE $* & diff --git a/roles/obs/templates/mpv.conf b/roles/obs/templates/mpv.conf index dce6481..6c90a6b 100644 --- a/roles/obs/templates/mpv.conf +++ b/roles/obs/templates/mpv.conf @@ -1,6 +1,8 @@ # {{ ansible_managed }} # Requires mpv >= 0.34.0 +input-ipc-server={{ emacsconf_home }}/mpv-socket-{{ emacsconf_id }}-{{ item.id }} +audio-device=pulse/{{ item.id }}-vid # Comment out the next line if you don't want this profile loaded by default. profile={{ emacsconf_id }}-talks # Then you can load it with `--profile={{ emacsconf_id }}-talks` @@ -14,7 +16,7 @@ video-align-y=-1 sub-use-margins=yes sub-scale-by-window=yes sub-pos=103 -sub-margin-x=105 +sub-margin-x=110 sub-margin-y=60 sub-align-x=left # Style diff --git a/roles/obs/templates/pulse b/roles/obs/templates/pulse index cba7fc0..7035cfe 100755 --- a/roles/obs/templates/pulse +++ b/roles/obs/templates/pulse @@ -135,8 +135,6 @@ load-module module-filter-apply #set-default-sink output #set-default-source input -{% for track in emacsconf_tracks %} -load-module module-null-sink sink_name={{ track.id }}-vid sink_properties=device.description={{ track.id }}-vid -load-module module-null-sink sink_name={{ track.id }}-qa sink_properties=device.description={{ track.id }}-qa -{% endfor %} +load-module module-null-sink sink_name={{ item.id }}-vid sink_properties=device.description={{ item.id }}-vid +load-module module-null-sink sink_name={{ item.id }}-qa sink_properties=device.description={{ item.id }}-qa load-module module-stream-restore restore_device=false diff --git a/roles/obs/templates/scenes.json b/roles/obs/templates/scenes.json index 6d8e7ad..5790efd 100644 --- a/roles/obs/templates/scenes.json +++ b/roles/obs/templates/scenes.json @@ -120,7 +120,7 @@ "push-to-talk": false, "push-to-talk-delay": 0, "settings": { - "file": "/home/{{ emacsconf_id }}-{{ item.id }}/other.svg" + "file": "/home/{{ emacsconf_id }}-{{ item.id }}/other.png" }, "sync": 0, "versioned_id": "image_source", @@ -145,7 +145,7 @@ "push-to-talk": false, "push-to-talk-delay": 0, "settings": { - "file": "/home/{{ emacsconf_id }}-{{ item.id }}/video.svg" + "file": "/home/{{ emacsconf_id }}-{{ item.id }}/video.png" }, "sync": 0, "versioned_id": "image_source", diff --git a/roles/obs/templates/xstartup-track b/roles/obs/templates/xstartup-track index b80caac..b8d90cd 100755 --- a/roles/obs/templates/xstartup-track +++ b/roles/obs/templates/xstartup-track @@ -7,6 +7,7 @@ pulseaudio --start pacmd set-default-sink {{ item.id }}-qa firefox file:///data/emacsconf/{{ emacsconf_year }}/index-{{ item.id }}.html & $HOME/bin/track-obs & +mumble mumble://{{ emacsconf_id }}-{{ item.id }}@{{ mumble_server }}/{{ item.mumble_channel }} & termit & # $HOME/{{ item.id }}-obs & # $HOME/{{ item.id }}-mpv $HOME/logo.png & |