Skip to content

Commit

Permalink
fix
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 0925b89 commit 843e20b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y libasound2-dev libgtk-3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev ffmpeg
sudo apt-get install -y libavutil-dev libavformat-dev libavfilter-dev libavdevice-dev
sudo apt-get install -y pkg-config xvfb pulseaudio xdotool x11-xserver-utils
sudo apt-get install -y pkg-config xvfb pulseaudio xdotool x11-xserver-utils sox
- name: Build CLI
run: cargo build --release --bin screenpipe
Expand All @@ -165,7 +165,8 @@ jobs:
- name: Set up virtual display and audio (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
Xvfb :99 -ac -screen 0 1920x1080x24 &
sudo apt-get install -y xvfb pulseaudio ffmpeg imagemagick xdotool
Xvfb :99 -ac -screen 0 1024x768x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
pulseaudio --start
pacmd load-module module-null-sink sink_name=virtual_speaker
Expand Down
8 changes: 4 additions & 4 deletions scripts/simulate_audio_activity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# Check if running on Ubuntu
if [[ "$(uname)" == "Linux" ]]; then
# Generate a silent audio file
ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -t 10 -q:a 9 -acodec libmp3lame silence.mp3
# Generate a simple melody using Sox
sox -n generated_audio.wav synth 0.5 sine 440 synth 0.5 sine 494 synth 0.5 sine 523 synth 0.5 sine 587 synth 0.5 sine 659 synth 0.5 sine 698 synth 0.5 sine 784 synth 0.5 sine 880

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

# Check if running on Ubuntu
if [[ "$(uname)" == "Linux" ]]; then
# 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

# Display the content using cat (this will be visible in the virtual framebuffer)
cat test_content.txt
# Function to simulate mouse movement
simulate_mouse() {
for i in {1..10}; do
xdotool mousemove $((RANDOM % 1024)) $((RANDOM % 768))
sleep 0.5
done
}

# Function to simulate typing
simulate_typing() {
xdotool type "Screenpipe Test Content"
xdotool key Return
xdotool type "This is a test of screenpipe CLI"
xdotool key Return
}

# Main simulation loop
for i in {1..6}; do
simulate_mouse
simulate_typing
sleep 1
done

# Keep the script running for a while to allow screen capture
sleep 60
sleep 30
fi

0 comments on commit 843e20b

Please sign in to comment.