Auto-scroll truncated text
When text is truncated it should automatically scroll left and right on an interval.
E.g. given the text "Never gonna give you up - Rick Astley"
You would move the truncation offset about 1 character every 500ms until the end is reached (at which point it should reverse).
There should also be a short delay (2 seconds or so) when the truncation offset reaches 0 again.
e.g. (the bar represents the truncation)
Never gonna give you up - Rick Astley
| ---------------- |
rendered: Never gonna give...
~500ms later:
Never gonna give you up - Rick Astley
| ---------------- |
rendered: ever gonna give ...
~500ms later:
Never gonna give you up - Rick Astley
| ---------------- |
rendered: ver gonna give y...
... etc
I've been grabbing lil tidbits of the internet on where to learn things that might help add features to this, and I have just the thing for this one, with code example through python curses:
https://www.youtube.com/watch?v=FGcZeVDWXR0