make better
This commit is contained in:
13
bin/gsr
13
bin/gsr
@ -1,22 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
GSRPID=$(pidof gpu-screen-recorder)
|
GSRPID=$(pidof gpu-screen-recorder)
|
||||||
DWMBLOCKSPID=$(pidof dwmblocks)
|
DWMBLOCKSPID=$(pidof dwmblocks)
|
||||||
|
AUDIO="-ac opus -a default_output|default_input"
|
||||||
|
AUDIONOMIC="-ac opus -a default_output"
|
||||||
|
VIDEO="-w DP-4 -k hevc -c mkv -f 60 -bm cbr -q 12000"
|
||||||
|
OUTPUT="-o $HOME/wdraidz/media/game-videos/$(date +%m-%d-%Y_%R:%S).mkv"
|
||||||
|
|
||||||
if [ -n $GSRPID ]; then
|
if [ $GSRPID != 0 ]; then
|
||||||
kill -2 $GSRPID
|
kill -2 $GSRPID
|
||||||
kill -36 $DWMBLOCKSPID
|
kill -36 $DWMBLOCKSPID
|
||||||
notify-send "recording saved" -i :
|
notify-send "recording saved" -i :
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ $1 = 1 ]; then
|
if [ $1 = 1 ]; then
|
||||||
gpu-screen-recorder -w DP-4 -k hevc -c mkv -f 60 -bm cbr -q 12000 -ac opus -a "default_output" \
|
gpu-screen-recorder $VIDEO $AUDIONOMIC $OUTPUT&
|
||||||
-o "$HOME/wdraidz/media/game-videos/$(date +%m-%d-%Y_%R:%S).mkv"&
|
|
||||||
kill -36 $DWMBLOCKSPID
|
kill -36 $DWMBLOCKSPID
|
||||||
notify-send "recording started with no mic" -i :
|
notify-send "recording started with no mic" -i :
|
||||||
else
|
else
|
||||||
gpu-screen-recorder -w DP-4 -k hevc -c mkv -f 60 -bm cbr -q 12000 -ac opus -a "default_output|default_input" \
|
gpu-screen-recorder $VIDEO $AUDIO $OUTPUT&
|
||||||
-o "$HOME/wdraidz/media/game-videos/$(date +%m-%d-%Y_%R:%S).mkv"&
|
|
||||||
kill -36 $DWMBLOCKSPID
|
kill -36 $DWMBLOCKSPID
|
||||||
notify-send "recording started" -i :
|
notify-send "recording started" -i :
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user