I'm trying to set a little pomodoro/countdown timer for myself in the terminal.
This comment on Superuser offers a handy little shell function that will act as a countdown timer, which
printfs the remaining time to STDOUT (awesome). I was thinking it would be even better if I could see the live countdown in the title of that terminal emulator tab, so I could monitor my remaining time without having to switch back and forth between tabs.
It appears the
PROMPT_COMMAND environment variable can be used to update the window title, but since its contents are executed only just before Bash displays a prompt, there's no way it can live update the title while the process is running (that I know of).
Is there any way this can be done?
(It has occurred to me that I could solve this more easily by splitting a new pane in tmux, but I'm on a small screen, and I'd appreciate being able to save all the screen real estate I can.)