Attempt colors Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Anirudh Oppiliappan x@icyphox.sh
Sun, 02 Feb 2020 16:49:03 +0530
2 files changed,
10 insertions(+),
9 deletions(-)
M
example/1-hi.txt
→
example/1-hi.txt
@@ -1,6 +1,6 @@
HI THERE -Welcome to shlide. Here are a few bullet points: +Welcome to $CYNshlide$RST. Here are a few bullet points: - first point - second point
M
shlide
→
shlide
@@ -5,13 +5,14 @@ # Each slide is a textfile under path/to/slides
# Color definitions -#BLK="\e[30m" -#RED="\e[31m" -#GRN="\e[32m" -#YLW="\e[33m" -#BLU="\e[34m" -#PUR="\e[35m" -#CYN="\e[36m" +BLK="\e[30m" +RED="\e[31m" +GRN="\e[32m" +YLW="\e[33m" +BLU="\e[34m" +PUR="\e[35m" +CYN="\e[36m" +RST="\e[0m" lstrip() { # See: https://github.com/dylanaraps/pure-bash-bible#strip-pattern-from-start-of-string@@ -54,7 +55,7 @@
while IFS= read -r line; do # Print the contents of the slide file, # line by line. - printf '%s' "$line" + printf "%s" "$line" # Move down and back after each print. printf '\e[%sD\e[B' "${#line}" done <<< "$slide_contents"