Replace WGETCH() with input_char(), which works the same except it supports an
input buffer. Calling input_macro(s) sets the input buffer to 's'. The input
buffer is returned by input_char() as if it had been typed by the user.
If an error occurs (cmderr()), the input buffer is cleared.
Instead of using halfdelay() and relying on GETCH() to return, poll for
input ourselves using select() and only call GETCH() when input is ready.
On Darwin, use kqueue instead of select. This allows us to receive IOKit
notifications directly to the main thread, instead of having a separate
thread dedicated to that. We also no longer link to CoreFoundation.
There's no point having both 'interrupt' and 'mark-interrupt', as it only
ever makes sense to use one or the other depending on the current timer
state. Merge them into a single command (interrupt), and for compatibility
bind both 'R' and 'r' to that command.
For backward-compatibility, this is actually a non-billable flag, so all
existing entries will be considered billable. The flag is 'n', the UI
flag is 'B', the toggle function is "billable" and the default key binding is
'b'.
For now, this isn't useful for anything.
Currently, if the computer goes to sleep and wakes up later, TTS will count
all the time spent asleep against the currently running entry (if any). If
(like me) your computer being asleep means you aren't working, this probably
means you just forgot to stop the time, and now you need to somehow calculate
(or guess) how much time to subtract.
With this change, TTS will instead prompt on wake-up whether to remove the
time spent sleeping from the current entry.