Another attempt with progressbars in yad and details of what's happening.
This commit is contained in:
@@ -226,16 +226,45 @@ agm_progressbox() {
|
||||
local text="$2"
|
||||
|
||||
if [[ "$dialogType" == "yad" ]]; then
|
||||
# More accessible approach: Use a log window instead of pulsating progress
|
||||
# This shows actual command output which is more informative for screen readers
|
||||
# Use a text-info dialog that auto-closes when command finishes
|
||||
# This is more accessible than progress bars for screen readers
|
||||
{
|
||||
cat
|
||||
echo "=== Operation completed ==="
|
||||
} | yad --text-info \
|
||||
--title="$title" \
|
||||
--text="$text" \
|
||||
--width=600 \
|
||||
--height=400 \
|
||||
--timeout=1 \
|
||||
--timeout-indicator=bottom \
|
||||
--button="Close:0" \
|
||||
--tail
|
||||
else
|
||||
dialog --title "$title" \
|
||||
--progressbox "$text" 20 70
|
||||
fi
|
||||
}
|
||||
|
||||
# Simple progress box that just shows the operation is running (no command output)
|
||||
# Usage: command | agm_simple_progressbox "title" "text"
|
||||
agm_simple_progressbox() {
|
||||
local title="$1"
|
||||
local text="$2"
|
||||
|
||||
if [[ "$dialogType" == "yad" ]]; then
|
||||
# Just show a simple status with no pulsating - more accessible
|
||||
yad --progress \
|
||||
--title="$title" \
|
||||
--text="$text" \
|
||||
--enable-log="Operation Details" \
|
||||
--log-expanded \
|
||||
--auto-close \
|
||||
--width=500 \
|
||||
--height=300
|
||||
--width=400 \
|
||||
--height=100 &
|
||||
local yadPid=$!
|
||||
# Read from stdin and discard, but keep yad window open until command finishes
|
||||
cat > /dev/null
|
||||
# Close the progress dialog
|
||||
kill $yadPid 2>/dev/null
|
||||
else
|
||||
dialog --title "$title" \
|
||||
--progressbox "$text" 20 70
|
||||
|
Reference in New Issue
Block a user