diff options
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 |
