Skip to content

Commit

Permalink
screen capture issues 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 b94b6c1 commit 2980c25
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 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 --disable-window-capture &
DISPLAY=:99 ./target/release/screenpipe --data-dir ./test_data &
for i in {1..24}; do
sleep 10
response=$(curl -s http://localhost:3030/health)
Expand Down
19 changes: 14 additions & 5 deletions scripts/simulate_screen_activity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@

# Check if running on Ubuntu
if [[ "$(uname)" == "Linux" ]]; then
# Create a simple window
xterm -e "echo 'Screenpipe Test Window'; sleep 60" &
# Create a simple window using xterm
xterm -e "echo 'Screenpipe Test Window'; sleep 300" &

# Wait for xterm to start
sleep 2

# 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 $((RANDOM % 1920)) $((RANDOM % 1080))
xdotool mousemove --window $WINDOW_ID $((RANDOM % 500)) $((RANDOM % 300))
sleep 1
done

# Simulate typing
xdotool type "This is a test of screenpipe CLI"
xdotool key Return
xdotool type --window $WINDOW_ID "This is a test of screenpipe CLI"
xdotool key --window $WINDOW_ID Return
fi

0 comments on commit 2980c25

Please sign in to comment.