Mercurial > repos > other > usr-local-bin
view record-app @ 27:c7621908cb47
Try to manage disk usage for backup
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 07 Mar 2020 16:37:38 +0000 |
parents | e85e3470a41e |
children |
line wrap: on
line source
#! /bin/bash echo "Does not work yet" >&2 exit 1 MYCMD=$1 if [ -z "$MYCMD" ]; then echo "Usage: $0 <app-name>" >&2 exit 1 fi INDEX='' pacmd list-sink-inputs | while read line; do if echo "$line" | grep -qE "^index:"; then index=$(echo "$line" | cut -f2 -d:) elif echo "$line" | grep -qE "^client:.*$MYCMD"; then INDEX=$index fi done if [ -z "$INDEX" ]; then echo "Unable to find stream for $MYCMD" >&2 exit 1 fi # TODO: Work out null sink stuff pactl load-module module-null-sink sink_name=steam pactl move-sink-input $INDEX steam parec -d steam.monitor | oggenc -b 192 -o steam.ogg --raw -