aboutsummaryrefslogtreecommitdiff
path: root/configs/party-mode
diff options
context:
space:
mode:
Diffstat (limited to 'configs/party-mode')
-rwxr-xr-xconfigs/party-mode/spawn_mp3blaster13
-rwxr-xr-xconfigs/party-mode/spawn_mpsyt13
-rw-r--r--configs/party-mode/xinitrc22
3 files changed, 48 insertions, 0 deletions
diff --git a/configs/party-mode/spawn_mp3blaster b/configs/party-mode/spawn_mp3blaster
new file mode 100755
index 0000000..05a8b91
--- /dev/null
+++ b/configs/party-mode/spawn_mp3blaster
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+if [ `id -u` -ne 0 ]; then
+ echo "$0: run with sudo $0" >&2
+ exit 1
+fi
+SD_USER="${SUDO_USER}"
+if [ "x${SD_USER}" = "x" ]; then
+ echo "$0: run with sudo $0" >&2
+ exit 2
+fi
+export SD_USER
+openvt -l -s -- su -l ${SD_USER} -s /usr/bin/padsp /usr/bin/mp3blaster
diff --git a/configs/party-mode/spawn_mpsyt b/configs/party-mode/spawn_mpsyt
new file mode 100755
index 0000000..9e0f25e
--- /dev/null
+++ b/configs/party-mode/spawn_mpsyt
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+if [ `id -u` -ne 0 ]; then
+ echo "$0: run with sudo $0" >&2
+ exit 1
+fi
+SD_USER="${SUDO_USER}"
+if [ "x${SD_USER}" = "x" ]; then
+ echo "$0: run with sudo $0" >&2
+ exit 2
+fi
+export SD_USER
+openvt -l -s -- su -l ${SD_USER} -s /usr/local/bin/mpsyt
diff --git a/configs/party-mode/xinitrc b/configs/party-mode/xinitrc
new file mode 100644
index 0000000..0af0a8b
--- /dev/null
+++ b/configs/party-mode/xinitrc
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+xset -dpms
+xset s noblank
+matchbox-window-manager -use_titlebar no -use_desktop_mode plain -use_cursor no &
+pulseaudio --fail=false --start &
+projectM-pulseaudio &
+sleep 5
+sudo /usr/bin/spawn_mp3blaster &
+sleep 1
+sudo /usr/bin/spawn_mpsyt &
+sleep 2
+
+while (`true`); do
+ pidof mp3blaster >/dev/null
+ if [ $? -ne 0 ]; then
+ pulseaudio -k
+ killall mpsyt
+ exit 0
+ fi
+ sleep 1
+done