Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[computer use] Why does tint2 take 15s to start? #219

Open
skull8888888 opened this issue Dec 23, 2024 · 0 comments
Open

[computer use] Why does tint2 take 15s to start? #219

skull8888888 opened this issue Dec 23, 2024 · 0 comments

Comments

@skull8888888
Copy link

Running it M4 pro, still tint2 takes 15s to start, according to the starting script. I haven't changed it, just added the timing.

#!/bin/bash
start_time=$(date +%s.%N)
echo "starting tint2 on display :$DISPLAY_NUM ..."

# Start tint2 and capture its stderr
tint2 -c $HOME/.config/tint2/tint2rc 2>/tmp/tint2_stderr.log &

# Wait for tint2 window properties to appear
timeout=300
while [ $timeout -gt 0 ]; do
    if xdotool search --class "tint2" >/dev/null 2>&1; then
        break
    fi
    sleep 0.1
    timeout=$((timeout - 1))
done

if [ $timeout -eq 0 ]; then
    echo "tint2 stderr output:" >&2
    cat /tmp/tint2_stderr.log >&2
    exit 1
fi

# Remove the temporary stderr log file
rm /tmp/tint2_stderr.log

end_time=$(date +%s.%N)
duration=$(echo "$end_time - $start_time" | bc)
echo "tint2 startup completed in $duration seconds"

The result
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant