summaryrefslogtreecommitdiff
path: root/share/hackvr/examples/marquee
diff options
context:
space:
mode:
authorepoch <epoch@thebackupbox.net>2020-10-10 00:00:55 -0500
committerepoch <epoch@thebackupbox.net>2020-10-10 00:00:55 -0500
commitfe9ad894000ff986cd642d23ac4762e97d5b1ccc (patch)
tree1e253ac02dc7d3339b60ca68d9bfca24cbd3ef7e /share/hackvr/examples/marquee
parent19feecae5124e5eb4c8a2f2dfd300e94e59b9d9f (diff)
parent4982876f0d021e4637f6db500063169477fe7289 (diff)
downloadhackvr-fe9ad894000ff986cd642d23ac4762e97d5b1ccc.tar.gz
hackvr-fe9ad894000ff986cd642d23ac4762e97d5b1ccc.zip
Merge branch 'master' of ssh://batou.thebackupbox.net:65432/hackvr
Diffstat (limited to 'share/hackvr/examples/marquee')
-rwxr-xr-xshare/hackvr/examples/marquee/marquee.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/share/hackvr/examples/marquee/marquee.sh b/share/hackvr/examples/marquee/marquee.sh
new file mode 100755
index 0000000..4ea6c61
--- /dev/null
+++ b/share/hackvr/examples/marquee/marquee.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -o pipefail
+
+pi=3 #lol
+
+from_cam=150
+
+elevation=10
+while printf "marquee rotate 0 +-2 0\n";do
+ sleep .1
+done &
+
+tail -F ~/.local/var/cache/music/nowplaying.txt 2>/dev/null | while read -r line;do
+ printf "%s deleteallexcept %s\n" "$USER" "$USER"
+ printf "nowplaying flatten\n"
+ printf "%s\n" "$line" >&2
+ chars="$(printf "%s" "$line" | wc -c | tr -cd '[0-9]')"
+ char_width=5 #I think..
+ rot=$[ 360 / $chars ]
+ diameter=$[ $chars * $char_width / $pi ]
+ printf "%s\n" "$line" | fold -w1 | while read -r char;do
+ printf "%s\n" "$char" | makelabel.sh nowplaying 0 0 0 | offsetshape.sh 0 0 "-${diameter}"
+ printf "nowplaying rotate 0 %d 0\n" "-$rot"
+ printf "nowplaying flatten\n"
+ done
+ printf "marquee assimilate nowplaying\n"
+ printf "marquee move 0 %s %s\n" "$elevation" "$[$diameter + $from_cam]" #this won't work before the generation loop unless I can flatten on certain parts.
+done