summaryrefslogtreecommitdiff
path: root/bin/extra/replay.sh
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-06-06 17:29:27 +0200
committerRaymaekers Luca <luca@spacehb.net>2025-06-06 17:29:27 +0200
commit755bb6cf7f8c69898c0fb55086c0b86510a03431 (patch)
treeddcdca2ef03466d82b138189bdf477654d646936 /bin/extra/replay.sh
parentc3c2050d2a6dda58f2ecaaa95da5855e7ca4a264 (diff)
checkpoint
Diffstat (limited to 'bin/extra/replay.sh')
-rwxr-xr-xbin/extra/replay.sh13
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