application name scripts: replace / and \ with _

This commit is contained in:
dec05eba
2024-03-22 01:14:12 +01:00
parent 1e466832b4
commit c691c72137
2 changed files with 2 additions and 0 deletions

View File

@@ -2,4 +2,5 @@
window=$(xdotool selectwindow) window=$(xdotool selectwindow)
window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "game") 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")" 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")"

View File

@@ -2,4 +2,5 @@
window=$(xdotool selectwindow) window=$(xdotool selectwindow)
window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "game") 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" gpu-screen-recorder -w "$window" -f 60 -c mkv -a "$(pactl get-default-sink).monitor" -r 60 -o "$HOME/Videos/replay/$window_name"