added own notification script
This commit is contained in:
@@ -5,8 +5,8 @@ SETUVAR DATABASE_URL:sqlite\x3adatabase\x2esqlite
|
||||
SETUVAR GLFW_IM_MODULE:ibus
|
||||
SETUVAR MANPAGER:sh\x20\x2dc\x20\x27col\x20\x2dbx\x20\x7c\x20bat\x20\x2dl\x20man\x20\x2dp\x27
|
||||
SETUVAR RUST_LOG:debug
|
||||
SETUVAR --export SSH_AGENT_PID:1385
|
||||
SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXXbvMvPU/agent\x2e1384
|
||||
SETUVAR --export SSH_AGENT_PID:966
|
||||
SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXXTYVBUH/agent\x2e965
|
||||
SETUVAR SXHKD_SHELL:/usr/bin/bash
|
||||
SETUVAR ZO_CMD:zo
|
||||
SETUVAR Z_CMD:z
|
||||
|
@@ -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.
|
||||
|
17
hypr/scripts/replay-notification.sh
Executable file
17
hypr/scripts/replay-notification.sh
Executable 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
|
Reference in New Issue
Block a user