Skip to content

Commit

Permalink
screen capture issue fix 2
Browse files Browse the repository at this point in the history
Signed-off-by: David Anyatonwu <[email protected]>
  • Loading branch information
onyedikachi-david committed Aug 26, 2024
1 parent 2980c25 commit 0925b89
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:
- name: Run CLI and check health (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
DISPLAY=:99 ./target/release/screenpipe --data-dir ./test_data &
DISPLAY=:99 ./target/release/screenpipe --data-dir ./test_data --fps 1 &
for i in {1..24}; do
sleep 10
response=$(curl -s http://localhost:3030/health)
Expand Down
7 changes: 5 additions & 2 deletions scripts/simulate_audio_activity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# Check if running on Ubuntu
if [[ "$(uname)" == "Linux" ]]; then
# Play a test audio file through the virtual speaker
ffplay -nodisp -autoexit -f lavfi -i sine=frequency=1000:duration=5 -af 'asetpts=PTS-STARTPTS' &
# Generate a silent audio file
ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -t 10 -q:a 9 -acodec libmp3lame silence.mp3

# Play the silent audio file (this will create audio activity without actual sound)
ffplay -nodisp -autoexit silence.mp3
fi
26 changes: 7 additions & 19 deletions scripts/simulate_screen_activity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,13 @@

# Check if running on Ubuntu
if [[ "$(uname)" == "Linux" ]]; then
# Create a simple window using xterm
xterm -e "echo 'Screenpipe Test Window'; sleep 300" &
# Create a simple text file with some content
echo "Screenpipe Test Content" > test_content.txt
echo "This is a test of screenpipe CLI" >> test_content.txt

# Wait for xterm to start
sleep 2
# Display the content using cat (this will be visible in the virtual framebuffer)
cat test_content.txt

# Get the window ID of the xterm window
WINDOW_ID=$(xdotool search --name "Screenpipe Test Window" | head -n 1)

# Activate the window
xdotool windowactivate $WINDOW_ID

# Simulate mouse movement
for i in {1..10}; do
xdotool mousemove --window $WINDOW_ID $((RANDOM % 500)) $((RANDOM % 300))
sleep 1
done

# Simulate typing
xdotool type --window $WINDOW_ID "This is a test of screenpipe CLI"
xdotool key --window $WINDOW_ID Return
# Keep the script running for a while to allow screen capture
sleep 60
fi

0 comments on commit 0925b89

Please sign in to comment.