Files
misc/bin/gsr
2026-01-04 01:56:38 -08:00

25 lines
677 B
Bash
Executable File

#!/bin/sh
GSRPID=$(pidof gpu-screen-recorder)
DWMBLOCKSPID=$(pidof dwmblocks)
AUDIO="-ac opus -a default_output|default_input"
AUDIONOMIC="-ac opus -a default_output"
VIDEO="-w DP-3 -k av1_10bit -c mkv -fm content -bm vbr"
OUTPUT="-o $HOME/wdraidz/media/game-videos/$(date +%m-%d-%Y_%R:%S).mkv"
if [ -n "$GSRPID" ]; then
kill -2 $GSRPID
kill -36 $DWMBLOCKSPID
notify-send "recording saved" -i :
exit
fi
if [ $1 = 1 ]; then
gpu-screen-recorder $VIDEO $AUDIONOMIC $OUTPUT&
kill -36 $DWMBLOCKSPID
notify-send "recording started with no mic" -i :
else
gpu-screen-recorder $VIDEO $AUDIO $OUTPUT&
kill -36 $DWMBLOCKSPID
notify-send "recording started" -i :
fi