this repo has no description
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

add end reached prompt

Akshay 9da2d560 5d125530

+23 -4
+23 -4
shlide
··· 60 60 61 61 } 62 62 63 + display_end() { 64 + read -r LINES COLUMNS < <(stty -F /dev/tty size) 65 + ((l=$LINES/2)) 66 + ((c=$COLUMNS/2 - 8)) 67 + printf '\e[2J' 68 + printf '\e[0;%sH' "$c" 69 + printf 'END. Press q to quit' 70 + } 71 + 63 72 main() { 64 73 65 74 slides_dir="${1:-./}" ··· 67 76 i=0 68 77 while true; do 69 78 70 - # Exit after last slide. 71 - [[ "$i" -gt "$((${#slides[@]} - 1))" ]] && { 72 - printf '\e[?25h' 73 - exit 79 + # Display END reached prompt, and then exit 80 + [[ "$i" -eq "${#slides[@]}" ]] && { 81 + display_end 82 + read -rsn1 input 83 + case "$input" in 84 + "j"|"n"|"q") 85 + printf '\e[2J' 86 + printf '\e[?25h' 87 + exit 88 + ;; 89 + *) 90 + ((--i)) 91 + ;; 92 + esac 74 93 } 75 94 76 95 # Don't go below 0.