Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/user202729/plover-textarea
Display a text area that can be controlled from other plugins or strokes.
https://github.com/user202729/plover-textarea
plover plover-plugins
Last synced: about 10 hours ago
JSON representation
Display a text area that can be controlled from other plugins or strokes.
- Host: GitHub
- URL: https://github.com/user202729/plover-textarea
- Owner: user202729
- License: gpl-3.0
- Created: 2021-05-14T02:54:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-13T04:56:58.000Z (over 3 years ago)
- Last Synced: 2024-09-18T17:46:09.032Z (9 days ago)
- Topics: plover, plover-plugins
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# plover-textarea
Display a text area that can be controlled from other plugins or strokes.
### Installation
This plugin can be installed from source on GitHub.
When it's released it can also be installed from PyPI (`pip install plover-textarea`)
or Plover's plugins manager.### Note
You need to enable the extension plugin.
### Configuration
Currently only some UNIX systems/terminals (xterm) are supported. Qt GUI output is not supported.
You need to create a file `textarea-config.json` in Plover's configuration directory with the content:
```json
{
"command": ["xterm", "-e", "cat /proc/$(echo $(ps -o ppid= $$))/fd/0"],
"escape_sequence_clear_window": "\u001B[H\u001B[J"
}
```### Usage
Define strokes like this
```json
{
"A": "{plover:textarea_write:a:b}",
"A": "{plover:textarea_write:a:text\n}",
"A": "{plover:textarea_clear:a}",
"A": "{plover:textarea_close:a}",
"...": "..."
}
````{}` should be escaped.
The value before the first `:` is the window name. Must be provided.
It's not possible to specify a window name that contains `:`, but it's possible in the Python API.
### Python API
Example code: (requires the extension plugin to be running)
```python
from plover_textarea.extension import get_instanceget_instance().write("a", "text to write\n")
get_instance().clear("a")
get_instance().close("a")
```