mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-04-21 09:19:36 +09:00
Mention where the video is saved in notification
This commit is contained in:
18
scripts/notify-saved-name.sh
Executable file
18
scripts/notify-saved-name.sh
Executable file
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user