From c691c7213798e6aeec09c44da1cce4f2725a1964 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 22 Mar 2024 01:14:12 +0100 Subject: application name scripts: replace / and \ with _ --- scripts/record-application-name.sh | 1 + scripts/replay-application-name.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/record-application-name.sh b/scripts/record-application-name.sh index da8b262..0411781 100755 --- a/scripts/record-application-name.sh +++ b/scripts/record-application-name.sh @@ -2,4 +2,5 @@ window=$(xdotool selectwindow) window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "game") +window_name="$(echo "$window_name" | tr '/\\' '_')" gpu-screen-recorder -w "$window" -f 60 -a "$(pactl get-default-sink).monitor" -o "$HOME/Videos/recording/$window_name/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")" diff --git a/scripts/replay-application-name.sh b/scripts/replay-application-name.sh index a5b4a88..826ca3b 100755 --- a/scripts/replay-application-name.sh +++ b/scripts/replay-application-name.sh @@ -2,4 +2,5 @@ window=$(xdotool selectwindow) window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "game") +window_name="$(echo "$window_name" | tr '/\\' '_')" gpu-screen-recorder -w "$window" -f 60 -c mkv -a "$(pactl get-default-sink).monitor" -r 60 -o "$HOME/Videos/replay/$window_name" -- cgit v1.2.3