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

@@ -5,8 +5,8 @@ SETUVAR DATABASE_URL:sqlite\x3adatabase\x2esqlite
SETUVAR GLFW_IM_MODULE:ibus SETUVAR GLFW_IM_MODULE:ibus
SETUVAR MANPAGER:sh\x20\x2dc\x20\x27col\x20\x2dbx\x20\x7c\x20bat\x20\x2dl\x20man\x20\x2dp\x27 SETUVAR MANPAGER:sh\x20\x2dc\x20\x27col\x20\x2dbx\x20\x7c\x20bat\x20\x2dl\x20man\x20\x2dp\x27
SETUVAR RUST_LOG:debug SETUVAR RUST_LOG:debug
SETUVAR --export SSH_AGENT_PID:1385 SETUVAR --export SSH_AGENT_PID:966
SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXXbvMvPU/agent\x2e1384 SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXXTYVBUH/agent\x2e965
SETUVAR SXHKD_SHELL:/usr/bin/bash SETUVAR SXHKD_SHELL:/usr/bin/bash
SETUVAR ZO_CMD:zo SETUVAR ZO_CMD:zo
SETUVAR Z_CMD:z SETUVAR Z_CMD:z

View File

@@ -15,9 +15,24 @@ start() {
video_path="$HOME/Videos/replay/" video_path="$HOME/Videos/replay/"
mkdir -p "$video_path" mkdir -p "$video_path"
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is starting ..." 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 \ gpu-screen-recorder \
-c mkv -bm qp -cr full -tune quality -k av1_10bit -q very_high -r 120 \ -w screen \
-replay-storage ram -ab 320 -cursor yes -keyint 2 -o "$video_path" &> /dev/null & -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" echo $! > "$PID_FILE"
} }
@@ -41,7 +56,7 @@ save() {
if [ -f "$PID_FILE" ]; then if [ -f "$PID_FILE" ]; then
PID=$(cat "$PID_FILE") PID=$(cat "$PID_FILE")
if ps -p "$PID" > /dev/null; then 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 else
# The process is not running, but the PID file exists. # The process is not running, but the PID file exists.
# This can happen if the process crashed. # This can happen if the process crashed.

View File

@@ -0,0 +1,17 @@
#!/bin/sh
PROGRAM_NAME="gpu-screen-recorder"
case "$2" in
replay)
notify-send -u low "$PROGRAM_NAME" "Replay saved: $1"
;;
regular)
notify-send -u low "$PROGRAM_NAME" "Stream/Video saved: $1"
;;
*)
echo "Usage: $0 {saved_file} {replay|regular}"
exit 1
esac
exit 0