From d690bbca35f35ddb7ab47562e22fc4f36501b455 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 10 May 2024 01:32:20 +0200 Subject: Add script to save recording, only show saved notification if gpu screen recorder was running when saving --- scripts/save-recording.sh | 3 +++ scripts/save-replay.sh | 3 +-- scripts/toggle-recording-selected.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100755 scripts/save-recording.sh (limited to 'scripts') diff --git a/scripts/save-recording.sh b/scripts/save-recording.sh new file mode 100755 index 0000000..90fefc1 --- /dev/null +++ b/scripts/save-recording.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +killall -SIGINT gpu-screen-recorder && sleep 0.5 && notify-send -t 1500 -u low "GPU Screen Recorder" "Recording saved" diff --git a/scripts/save-replay.sh b/scripts/save-replay.sh index 4c62750..f9390aa 100755 --- a/scripts/save-replay.sh +++ b/scripts/save-replay.sh @@ -1,4 +1,3 @@ #!/bin/sh -e -killall -SIGUSR1 gpu-screen-recorder -notify-send -t 1500 -u low -- "GPU Screen Recorder" "Replay saved" +killall -SIGUSR1 gpu-screen-recorder && sleep 0.5 && notify-send -t 1500 -u low -- "GPU Screen Recorder" "Replay saved" diff --git a/scripts/toggle-recording-selected.sh b/scripts/toggle-recording-selected.sh index dcc1ac4..309e4d1 100755 --- a/scripts/toggle-recording-selected.sh +++ b/scripts/toggle-recording-selected.sh @@ -1,6 +1,6 @@ #!/bin/sh -e -killall -INT gpu-screen-recorder && notify-send -u low 'GPU Screen Recorder' 'Stopped recording' && exit 0; +killall -SIGINT gpu-screen-recorder && sleep 0.5 && notify-send -t 1500 -u low 'GPU Screen Recorder' 'Stopped recording' && exit 0; window=$(xdotool selectwindow) active_sink="$(pactl get-default-sink).monitor" mkdir -p "$HOME/Videos" -- cgit v1.2.3