Skip to main content

SVG-based layout display plugin for Plover

Project description

Plover SVG Layout Display

PyPI GitHub

Display the last stroke in Plover, but ✨ fancier

svgld_1

SVG Layout Display is based on the original Layout Display Plugin by @morinted; it was designed to be more customizable than the original plugin, allowing the user to use custom shapes, and to define the behavior of these shapes using a custom script. The widget floats above other windows without a window frame, and can be configured to be translucent, which means that users have full control over how the display looks like.

If the display window looks like a black rectangle to you, you may need to install a compositor such as picom for transparency to work.

Settings

To open the settings page, focus on the display window and press Ctrl + S (or Cmd + S on mac). System settings are different for each stenographic system and will be recorded independently for each system.

To use the default purple layout, use :/svgld/en_layout.svg as the layout path and :/svgld/en_convert.py as the script path.

Customization

svgld_2

Layouts are defined by two separate files - the svg file, which defines all the shapes and their respective positions, and the py script, which defines which shapes are drawn based on the latest stroke and translation.

In the svg file, shapes are defined based on top-level <g> elements, identified by the id attribute. IDs should be unique between different groups, but there is no limit on the number of groups you can add in the svg file.

The python script should contain a convert_stroke, which takes a tuple of strokes and a translation, and outputs a list of shape IDs. The order of the IDs in the list matters, as they are drawn from the head of the list to the tail, and later shapes are drawn above earlier ones.

def convert_stroke(stroke: Tuple[str, ...], translation: str) -> List[str]:
    return ...

Note that the stroke parameter is a tuple of individual keys, such as ("K-", "W-", "-U", "-P")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plover_svg_layout_display-1.0.0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plover_svg_layout_display-1.0.0-py3-none-any.whl (28.7 kB view details)

Uploaded Python 3

File details

Details for the file plover_svg_layout_display-1.0.0.tar.gz.

File metadata

File hashes

Hashes for plover_svg_layout_display-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6ad9b06960c1b8e0bc6389af9cc11c0da7aa963487c6672b1faae5b7fd3be74d
MD5 aebe4fb8b6e5fb445e959726ab7bef1c
BLAKE2b-256 1e56d8da21ab588616a926dfba400e6f8ee21294852ee7c1748b2fe28b40ea59

See more details on using hashes here.

File details

Details for the file plover_svg_layout_display-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for plover_svg_layout_display-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffe8e89d79861d7b9869a046c13ac9541c0f2eaad8b10e13aa8f93a4f89a132b
MD5 bea4edd30e421c3f08ceb2e6f3de2f3b
BLAKE2b-256 1f21fd58a38697eb2a0af0d7b8c3f184ca42b77b6d19b75b0984a704369ed1db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page