diff options
| author | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
|---|---|---|
| committer | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
| commit | 7b21727285e50b0b050c4ddd70d07542229c5366 (patch) | |
| tree | 5d369153c5df5b41f3750d25479a68f20169c8ff /bin/gsr | |
init
Diffstat (limited to 'bin/gsr')
| -rwxr-xr-x | bin/gsr | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +#!/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 -SIGINT $GSRPID + kill -RTMIN+2 $DWMBLOCKSPID + notify-send "recording saved" -i : + exit +fi + +if [ $1 = 1 ]; then + gpu-screen-recorder $VIDEO $AUDIONOMIC $OUTPUT& + kill -RTMIN+2 $DWMBLOCKSPID + notify-send "recording started with no mic" -i : +else + gpu-screen-recorder $VIDEO $AUDIO $OUTPUT& + kill -RTMIN+2 $DWMBLOCKSPID + notify-send "recording started" -i : +fi |
