summaryrefslogtreecommitdiffstats
path: root/roles/obs/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/obs/templates')
-rw-r--r--roles/obs/templates/emacsconf-stream-config.el4
-rw-r--r--roles/obs/templates/i3-config2
-rwxr-xr-xroles/obs/templates/intro6
-rwxr-xr-xroles/obs/templates/music2
-rwxr-xr-xroles/obs/templates/overlay20
-rwxr-xr-xroles/obs/templates/play11
-rwxr-xr-xroles/obs/templates/play-with-intro9
-rw-r--r--roles/obs/templates/set-overlay20
8 files changed, 39 insertions, 35 deletions
diff --git a/roles/obs/templates/emacsconf-stream-config.el b/roles/obs/templates/emacsconf-stream-config.el
index bd5ffd7..2aa886b 100644
--- a/roles/obs/templates/emacsconf-stream-config.el
+++ b/roles/obs/templates/emacsconf-stream-config.el
@@ -13,7 +13,9 @@
(setq emacsconf-stream-track "{{ item.name }}")
(autoload 'text-property-search-forward "text-property-search")
(add-to-list 'load-path "~/emacsconf-el")
+(setq tab-width 2)
+(setq case-fold-search t)
+(setq emacsconf-cache-dir "{{ emacsconf_caption_dir }}/cache")
(require 'emacsconf)
(require 'emacsconf-stream)
(emacsconf-stream-display-clock-and-countdown)
-(setq tab-width 2)
diff --git a/roles/obs/templates/i3-config b/roles/obs/templates/i3-config
index 1787b64..31a7b40 100644
--- a/roles/obs/templates/i3-config
+++ b/roles/obs/templates/i3-config
@@ -23,7 +23,7 @@ font pango:monospace 8
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
-exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
+# exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
diff --git a/roles/obs/templates/intro b/roles/obs/templates/intro
index bf02dc3..7af9c4c 100755
--- a/roles/obs/templates/intro
+++ b/roles/obs/templates/intro
@@ -8,7 +8,7 @@ fi
SLUG=$1
FILE=$1
if [[ ! -f $FILE ]]; then
- LIST=({{ emacsconf_caption_dir }}/assets/stream/emacsconf-{{ emacsconf_year }}-$FILE--*.webm)
+ LIST=({{ emacsconf_caption_dir }}/cache/emacsconf-{{ emacsconf_year }}-$FILE--*.webm)
FILE="${LIST[0]}"
BY_SLUG=1
else
@@ -16,8 +16,8 @@ else
fi
shift
overlay $SLUG
-if [[ -f {{ emacsconf_caption_dir }}/assets/intros/$SLUG.webm ]]; then
- mpv {{ emacsconf_caption_dir }}/assets/intros/$SLUG.webm
+if [[ -f "$FILE" ]]; then
+ mpv "$FILE"
else
firefox {{ emacsconf_caption_dir }}/assets/in-between/$SLUG.png
fi
diff --git a/roles/obs/templates/music b/roles/obs/templates/music
index 3e729ec..a5a6a31 100755
--- a/roles/obs/templates/music
+++ b/roles/obs/templates/music
@@ -1,5 +1,5 @@
if screen -list | grep -q background; then
echo "Already running in screen, attach with screen -x background"
else
- screen -dmS background /bin/bash -c "mpv {{ background_music_dir }}/* --shuffle --loop=inf --volume={{ background_music_volume }}"
+ screen -dmS background /bin/bash -c "mpv {{ background_music_dir }}/* --shuffle --loop-playlist=inf --volume={{ background_music_volume }}"
fi
diff --git a/roles/obs/templates/overlay b/roles/obs/templates/overlay
index 1361884..0836a59 100755
--- a/roles/obs/templates/overlay
+++ b/roles/obs/templates/overlay
@@ -3,20 +3,20 @@
SLUG=$(echo "$1" | perl -ne 'if (/emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }')
-if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png ]]; then
+if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png ]]; then
echo "Found other overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png ~/other.png
-elif [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ]]; then
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png ~/other.png
+elif [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ]]; then
echo "Found video overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ~/other.png
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ~/other.png
else
- echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png, please override ~/other.png manually"
- cp {{ emacsconf_caption_dir }}/assets/overlays/blank-other.svg.png ~/other.png
+ echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png, please override ~/other.png manually"
+ cp {{ emacsconf_caption_dir }}/assets/overlays/blank-other.png ~/other.png
fi
-if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ]]; then
+if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ]]; then
echo "Found video overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ~/video.png
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ~/video.png
else
- echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png, override ~/video.png manually"
- cp {{ emacsconf_caption_dir }}/assets/overlays/blank-video.svg.png ~/video.png
+ echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png, override ~/video.png manually"
+ cp {{ emacsconf_caption_dir }}/assets/overlays/blank-video.png ~/video.png
fi
diff --git a/roles/obs/templates/play b/roles/obs/templates/play
index 22f58c7..69632d4 100755
--- a/roles/obs/templates/play
+++ b/roles/obs/templates/play
@@ -11,18 +11,25 @@ CACHE_DIR="{{ emacsconf_caption_dir }}/cache"
FIREFOX_NAME=firefox-esr
SLUG=$1
PREFIX=$(get-file-prefix $SLUG)
-
+PREFER_LIVE=$(jq -r ".talks[] | select(.slug == \"$SLUG\") | .\"prefer-live\" " < "$BASE_DIR/talks.json")
/usr/local/bin/reset-state
# Update the overlay
overlay $SLUG
+if [ "$PREFER_LIVE" = "t" ]; then
+ /usr/local/bin/bbb $SLUG
+ exit 0
+fi
+
# Play the video if it exists. If it doesn't exist, switch to the BBB room and stop processing.
if [ "x$TEST_MODE" = "x" ]; then
- LIST=($BASE_DIR/assets/stream/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm)
+ LIST=($CACHE_DIR/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm)
else
LIST=($BASE_DIR/assets/test/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm)
fi
+
+
FILE="${LIST[0]}"
# No file in the stream directory; check for original files in the stream directory, then check the cache
NOSUB=""
diff --git a/roles/obs/templates/play-with-intro b/roles/obs/templates/play-with-intro
index 7f7865b..0390f8f 100755
--- a/roles/obs/templates/play-with-intro
+++ b/roles/obs/templates/play-with-intro
@@ -13,15 +13,10 @@ PREFIX=$(get-file-prefix $SLUG)
/usr/local/bin/reset-state
# Update the overlay
-overlay $SLUG
+/usr/local/bin/overlay $SLUG
# Play the intro if it exists. If it doesn't exist, switch to the intro slide and stop processing.
-if [[ -f $CACHE_DIR/$PREFIX--intro.webm ]]; then
- mpv $CACHE_DIR/$PREFIX--intro.webm
-else
- firefox --kiosk $BASE_DIR/assets/in-between/$SLUG.png
- exit 0
-fi
+/usr/local/bin/intro $SLUG
/usr/local/bin/play $SLUG
diff --git a/roles/obs/templates/set-overlay b/roles/obs/templates/set-overlay
index 0b6712b..8a408bf 100644
--- a/roles/obs/templates/set-overlay
+++ b/roles/obs/templates/set-overlay
@@ -6,20 +6,20 @@ if [[ ! -f $FILE ]]; then
fi
shift
SLUG=$(echo "$FILE" | perl -ne 'if (/^emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }')
-if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png ]]; then
+if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png ]]; then
echo "Found other overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png ~/other.png
-elif [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ]]; then
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png ~/other.png
+elif [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ]]; then
echo "Found video overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ~/other.png
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ~/other.png
else
- echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png, please override ~/other.png manually"
- cp {{ emacsconf_caption_dir }}/assets/overlays/blank-other.svg.png ~/other.png
+ echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png, please override ~/other.png manually"
+ cp {{ emacsconf_caption_dir }}/assets/overlays/blank-other.png ~/other.png
fi
-if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ]]; then
+if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ]]; then
echo "Found video overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ~/video.png
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ~/video.png
else
- echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png, override ~/video.png manually"
- cp {{ emacsconf_caption_dir }}/assets/overlays/blank-video.svg.png ~/video.png
+ echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png, override ~/video.png manually"
+ cp {{ emacsconf_caption_dir }}/assets/overlays/blank-video.png ~/video.png
fi