diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-11-04 20:53:00 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-11-04 20:53:00 +0100 |
commit | 3d51801a90f5045871e575ed896c0be7619ba1f6 (patch) | |
tree | 9c6ff31c4c5166dfdc2670995b650a630961ad73 /scripts | |
parent | 26a9e750dc6f1313413524cd97e60a94e25a56ec (diff) |
Mention where the video is saved in notification
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/notify-saved-name.sh | 18 | ||||
-rwxr-xr-x | scripts/save-video-in-game-folder.sh | 4 |
2 files changed, 20 insertions, 2 deletions
diff --git a/scripts/notify-saved-name.sh b/scripts/notify-saved-name.sh new file mode 100755 index 0000000..09ae9d2 --- /dev/null +++ b/scripts/notify-saved-name.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +[ "$GSR_SHOW_SAVED_NOTIFICATION" != "1" ] && exit 0 + +filepath="$1" +type="$2" + +file_name="$(basename "$filepath")" +file_dir="$(dirname "$filepath")" + +case "$type" in + "regular") + gsr-notify --text "Saved recording to '$file_name'" --timeout 3.0 --icon record --bg-color "$GSR_NOTIFY_BG_COLOR" + ;; + "replay") + gsr-notify --text "Saved replay to '$file_name'" --timeout 3.0 --icon replay --bg-color "$GSR_NOTIFY_BG_COLOR" + ;; +esac
\ No newline at end of file diff --git a/scripts/save-video-in-game-folder.sh b/scripts/save-video-in-game-folder.sh index 4dafa03..694c9d8 100755 --- a/scripts/save-video-in-game-folder.sh +++ b/scripts/save-video-in-game-folder.sh @@ -17,9 +17,9 @@ mv "$filepath" "$new_filepath" case "$type" in "regular") - gsr-notify --text "Saved recording to a folder called '$game_name'" --timeout 3.0 --icon record --bg-color "$GSR_NOTIFY_BG_COLOR" + gsr-notify --text "Saved recording to '$game_name/$file_name'" --timeout 3.0 --icon record --bg-color "$GSR_NOTIFY_BG_COLOR" ;; "replay") - gsr-notify --text "Saved replay to a folder called '$game_name'" --timeout 3.0 --icon replay --bg-color "$GSR_NOTIFY_BG_COLOR" + gsr-notify --text "Saved replay to '$game_name/$file_name'" --timeout 3.0 --icon replay --bg-color "$GSR_NOTIFY_BG_COLOR" ;; esac
\ No newline at end of file |