* chore: use verbs in background, foreground, and window request cmd names
This renames a few existing commands to make it clearer that the user is
firing off a task.
* WindowSize -> RequestWindowSize
* ForegroundColor -> RequestForegroundColor
* BackgroundColor -> RequestBackgroundColor
It also expands on a few comments, and provides examples.
* fix: screen tests
* fix(examples): use RequestWindowSize instead of WindowSize
---------
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* feat: combine keyboard enhancements into a nicer API
This change combines the keyboard enhancements into a nicer API. Kitty
keyboard protocol and XTerm modifyOtherKeys are now combined into a
single API. This makes it easier to enable keyboard enhancements.
Use `WithKeyboardEnhancements` to enable keyboard enhancements. This
function accepts a list of `KeyboardEnhancement` functions that can be
used to enable different keyboard features.
For now, we only support the `WithReleaseKeys` enhancement which enables
support for reporting release key events.
* Update options.go
Co-authored-by: Christian Rocha <christian@rocha.is>
* chore: go mod tidy
* chore: gofumpt
* fix: simplify keyboard enhancements disambiguation
* feat: make KeyboardEnhancementsMsg helpers always return true on Windows
* fix: remove unused win32input mode
* refactor: rename KeyboardEnhancementsMsg methods
---------
Co-authored-by: Christian Rocha <christian@rocha.is>
* docs: improve godoc on tick and every
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* docs: small improvements
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* docs: add loop examples for Tick/Every in GoDocs
* docs: small wording adjustments
* docs: small copy edits
Co-authored-by: Christian Rocha <christian@rocha.is>
Tea core now sends the terminal dimensions on start and when the window
is resized (except on Windows where SIGWINCH, the resize signal, is not
supported).