tpm2q3kled/launch-led

30 lines
694 B
Bash
Executable File

#!/bin/bash
#
# Usage: PULSE_SERVER=sound.waw.hackerspace.pl ./launch-led projectM-pulseaudio
#
trap 'pkill -P $$' SIGINT
Xephyr -br -ac -noreset -screen 128x128 :1 &
export DISPLAY=:1
(while true; do
gst-launch-1.0 -q ximagesrc use-damage=0 show-pointer=false endx=128 endy=128 ! queue ! videoconvert ! videorate ! video/x-raw,format=RGB,width=128,height=128 ! fdsink | python send.py 10.8.1.26 128 128
sleep 0.5
done) &
# ...resize current window to screen size
(#while true; do
sleep 2
xdotool search --onlyvisible . windowmove 0 0 windowsize 129 129
sleep 10
xdotool search --onlyvisible . windowmove 0 0 windowsize 129 129
#done
) &
sleep 1
$*
pkill -P $$