added own notification script

This commit is contained in:
2025-08-09 20:01:04 +02:00
parent e2d9f5ab05
commit 087f199ca0
3 changed files with 38 additions and 6 deletions

View File

@@ -15,9 +15,24 @@ start() {
video_path="$HOME/Videos/replay/"
mkdir -p "$video_path"
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is starting ..."
gpu-screen-recorder -w screen -f 120 -a default_output -a default_input -fm vfr \
-c mkv -bm qp -cr full -tune quality -k av1_10bit -q very_high -r 120 \
-replay-storage ram -ab 320 -cursor yes -keyint 2 -o "$video_path" &> /dev/null &
gpu-screen-recorder \
-w screen \
-f 60 \
-a default_output -a default_input \
-fm vfr \
-c mkv \
-encoder gpu \
-bm qp \
-cr full \
-tune quality \
-k av1_10bit \
-q high \
-r 120 \
-replay-storage ram \
-ab 320 \
-cursor yes \
-sc "$HOME/.config/hypr/scripts/replay-notification.sh" \
-o "$video_path" &> /dev/null &
echo $! > "$PID_FILE"
}
@@ -41,7 +56,7 @@ save() {
if [ -f "$PID_FILE" ]; then
PID=$(cat "$PID_FILE")
if ps -p "$PID" > /dev/null; then
pkill -SIGUSR1 -f gpu-screen-recorder && sleep 0.5 && notify-send -u low "$PROGRAM_NAME" "Saving replay..."
pkill -SIGUSR1 -f gpu-screen-recorder
else
# The process is not running, but the PID file exists.
# This can happen if the process crashed.