diff options
| author | Raymaekers Luca <luca@spacehb.net> | 2025-06-06 17:29:27 +0200 |
|---|---|---|
| committer | Raymaekers Luca <luca@spacehb.net> | 2025-06-06 17:29:27 +0200 |
| commit | 755bb6cf7f8c69898c0fb55086c0b86510a03431 (patch) | |
| tree | ddcdca2ef03466d82b138189bdf477654d646936 /bin/extra/replay.sh | |
| parent | c3c2050d2a6dda58f2ecaaa95da5855e7ca4a264 (diff) | |
checkpoint
Diffstat (limited to 'bin/extra/replay.sh')
| -rwxr-xr-x | bin/extra/replay.sh | 13 |
1 files changed, 13 insertions, 0 deletions
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 |
