Fixing screenrecord
This commit is contained in:
@@ -118,11 +118,11 @@ start_screenrecording() {
|
||||
}
|
||||
|
||||
stop_screenrecording() {
|
||||
pkill -SIGINT -f "^gpu-screen-recorder" # SIGINT required to save video properly
|
||||
pkill -SIGINT -f "[g]pu-screen-recorder" # SIGINT required to save video properly
|
||||
|
||||
# Wait a maximum of 5 seconds to finish before hard killing
|
||||
local count=0
|
||||
while pgrep -f "^gpu-screen-recorder" >/dev/null && ((count < 50)); do
|
||||
while pgrep -f "[g]pu-screen-recorder" >/dev/null && ((count < 50)); do
|
||||
sleep 0.1
|
||||
count=$((count + 1))
|
||||
done
|
||||
@@ -130,8 +130,8 @@ stop_screenrecording() {
|
||||
toggle_screenrecording_indicator
|
||||
cleanup_webcam
|
||||
|
||||
if pgrep -f "^gpu-screen-recorder" >/dev/null; then
|
||||
pkill -9 -f "^gpu-screen-recorder"
|
||||
if pgrep -f "[g]pu-screen-recorder" >/dev/null; then
|
||||
pkill -9 -f "[g]pu-screen-recorder"
|
||||
notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000
|
||||
else
|
||||
trim_first_frame
|
||||
@@ -146,7 +146,7 @@ toggle_screenrecording_indicator() {
|
||||
}
|
||||
|
||||
screenrecording_active() {
|
||||
pgrep -f "^gpu-screen-recorder" >/dev/null
|
||||
pgrep -f "[g]pu-screen-recorder" >/dev/null
|
||||
}
|
||||
|
||||
trim_first_frame() {
|
||||
|
||||
@@ -265,6 +265,7 @@ go_to_menu() {
|
||||
*system*) show_system_menu ;;
|
||||
*capture*) show_capture_menu ;;
|
||||
*toggle*) show_toggle_menu ;;
|
||||
*screenrecord*) show_screenrecord_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user