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-0.0.7.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

plover_svg_layout_display-0.0.7-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file plover-svg-layout-display-0.0.7.tar.gz.

File metadata

  • Download URL: plover-svg-layout-display-0.0.7.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for plover-svg-layout-display-0.0.7.tar.gz
Algorithm Hash digest
SHA256 b791e6525637c8fab56e7f5b2f390f802134fc25c560cf0475fe0d547d4c733b
MD5 59ff371553299cb8d4af33fe81681f19
BLAKE2b-256 ec754b04fcdaeb7470f8b37f06da4b25a42365cad75b550b4c11b54002c34041

See more details on using hashes here.

File details

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

File metadata

  • Download URL: plover_svg_layout_display-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for plover_svg_layout_display-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ace357af09fb18b5b5ed1a6e261730077ae8380427579e73e86196baa44aab7a
MD5 11b3d21ac1d7b27def3b58b2372df254
BLAKE2b-256 5202b7655b118276866f0510e623b9d88aaf3638e8ecf24ec97a544e9bc96b00

See more details on using hashes here.

Supported by

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