commit 38f19d60779eba1525d1e8036aa02e7f43354901
parent f08d3c3a35f46d1d7997b499c3a9d75fdc2abc3b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 13 Jun 2023 21:43:38 +0200
Sample slides update
On the first slide, enhance the basic keys help message. The previous
message was too brief for some users.
Make the script slide clearer. The text now explains that the slide is a
script, which now provides interactivity to highlight it. Add comments
in the script sources to notify that it has been printed once the script
has been completed.
Diffstat:
5 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/diaposishell b/diaposishell
@@ -54,7 +54,7 @@ short_help()
printf "p previous\n"
printf "q quit\n"
printf "\n"
- printf "Enter to return to presentation\n"
+ printf "Enter to quit help\n"
}
next_slide()
diff --git a/example/00-intro.txt b/example/00-intro.txt
@@ -5,5 +5,7 @@
│ USING THE SHELL FOR EFFECTIVE PRESENTATIONS │
└─────────────────────────────────────────────┘
- (type h for short help)
+ [4;36mn[m to go the next slide
+ [4;36mh[m for short help
+ [4;36mEnter[m to confirm input
diff --git a/example/02-script.sh b/example/02-script.sh
@@ -1,9 +1,24 @@
#!/bin/sh -e
-printf "\e[?1049h" # Switch to alternate buffer
-printf "\e[2J" # Clear the screen
-printf "\e[0;0H" # Move cursor to the origin
-printf "Use scripts to invoke third-party programs and do fancy things.\n"
-read -r c
-man ./diaposishell.1
+# After execution, the script sources are displayed
+
+printf "\e[?1049h\e[2J\e[0;0H" # Switch buffer, clear screen and mv cursor
+
+printf "Scripts\n"
+printf "=======\n\n"
+printf "‣ Use scripts to invoke third-party programs and do fancy things\n\n"
+printf "‣ This slide is currently a script that gives you the choice\n"
+printf " of printing the diaposishell man page or not\n\n"
+
+while true; do
+ printf " Print diaposishell man page? [y/n] "
+
+ read -r c
+ case "${c}" in
+ "y") man ./diaposishell.1 && break;;
+ "n") break;;
+ *) continue;;
+ esac
+done
+
printf "\e[?1049l" # Restore main buffer
diff --git a/example/03-run.txt b/example/03-run.txt
@@ -5,4 +5,4 @@ Run diaposishell with the list of slides as arguments
diaposishell \
"$(find example/ -name "*.txt" -o -name "*.sh" | sort)" \
- "THANK YOU"
+ "That's all folks!"
diff --git a/run_example.sh b/run_example.sh
@@ -1,3 +1,3 @@
#!/bin/sh -e
slides=$(find example -name "*.txt" -o -name "*.sh" | sort)
-./diaposishell -x "${slides}" "THANK YOU"
+./diaposishell -x "${slides}" "That's all folks"