From 755bb6cf7f8c69898c0fb55086c0b86510a03431 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 6 Jun 2025 17:29:27 +0200 Subject: checkpoint --- bin/extra/replay.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/extra/replay.sh (limited to 'bin/extra/replay.sh') diff --git a/bin/extra/replay.sh b/bin/extra/replay.sh new file mode 100755 index 0000000..2a18352 --- /dev/null +++ b/bin/extra/replay.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +File="$1" +OutputDir="$(dirname "$File")" +OutputFile="$(basename "$File")" +ActiveWindowName="$(xprop -id "$(xdotool getactivewindow)" WM_CLASS | awk -F '"' '{print $(NF-1)}')" + +if [ "$ActiveWindowName" ] +then + OutputFileName="${ActiveWindowName}_${OutputFile#Replay_}" + mv "$File" "$OutputDir"/"$OutputFileName" + notify-send '*replay.sh' "saved: $OutputFileName" +fi -- cgit v1.2.3-70-g09d2