A Python GUI application that allows users to execute commands via image buttons with customizable labels, optional timeouts with countdown timers, and default button auto-selection.
- Local & Remote Images: Support for local image files and HTTP/HTTPS URLs
- Image Formats: Works with .ppm, .gif, and .png formats
- Customizable Labels: Add text labels below each button
- Optional Caching: Enable
--cacheto store downloaded images locally - Timeout Feature: Set a countdown timer that auto-executes a default button
- Progress Bar: Visual countdown display showing remaining seconds
- Backward Countdown: Progress bar fills from left to right as time counts down
- Default Button: Automatically execute a command when timeout expires
- Error Handling: Graceful fallback to text buttons if images fail to load
Install the required dependencies:
e.g. debian/xbuntu sudo apt-get install -y --no-install-recommends python3-tk
native or in venv:
python -m pip install requests tk python app.py --question "Choose an option:" --images btn1.ppm btn2.ppm --commands "echo Hello" "echo World"
python app.py --question "Pick action:" --images https://example.com/yes.ppm https://example.com/no.ppm --commands "echo Yes" "echo No" --labels "Approve" "Reject"
python app.py --question "Auto-execute in 30 seconds:" --images yes.ppm no.ppm --commands "echo Default action" "echo Other action" --labels "Yes" "No" --timeout 30 --default-button 0
python app.py --question "Mixed sources:" --images local.ppm https://example.com/remote.ppm --commands "script1.sh" "script2.sh" --cache --labels "Local" "Remote" --timeout 60 --default-button 1