snix/users/sterni/acme
sterni ba2d2d3eea feat(sterni/acme/plan9port): completely ignore the primary selection
TL;DR: xwayland-satellite (which I use) doesn't sync the primary
selection between X11 and wayland. Since devdraw prefers the primary
selection over the clipboard if populated, it is impossible to paste
from wayland (i.e. from the clipboard) in devdraw windows after cutting
once on the plan9port side (which populates the primary selection).

Change-Id: Idc46b875f294bf90d477ee7fe138dcd17e755221
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13102
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-02-05 17:54:30 +00:00
..
plan9port feat(sterni/acme/plan9port): completely ignore the primary selection 2025-02-05 17:54:30 +00:00
plumb style(sterni/acme/plumb): use tabs to separate the fields 2025-01-24 14:48:54 +00:00
mkbqnkeyboard.bqn fix(sterni/acme/mkbqnkeyboard.bqn): allow multiple flags in one arg 2025-02-05 15:16:11 +00:00
README.md docs(sterni/acme): document mkbqnkeyboard.bqn 2025-02-05 15:20:42 +00:00

//users/sterni/acme

Utilities and configurations related to the acme text editor from Plan 9.

mkbqnkeyboard.bqn

mkbqnkeyboard.bqn is a script that updates a given Plan 9 /lib/keyboard file to support the familiar BQN keymap via compose sequences. Since it uses the GNU Readline inputrc distributed with BQN as a database for the keymap, you can use a remapped version of the layout. Once applied, you'll be able to type the Unicode characters used by BQN via Compose followed by \ and the mapped ASCII character. For details on the file and what button is used for Compose, refer to keyboard(6) (see also plan9port's keyboard(7), 9front's keyboard(6) etc.).

TIP: mkbqnkeyboard.bqn has only been tested with plan9port, so the instructions below may not work with every Plan 9 variant. If you have any any information on/trouble with getting it to work on a proper Plan 9 (fork), feel free to let me know or send a patch.

The process for updating /lib/keyboard with mkbqnkeyboard.bqn is a follows:

  1. Prerequisites:

    • CBQN (other BQN implementations are untested)
    • A local checkout of mlochbaum/BQN, aecb56a323aa is the latest tested revision.
  2. Run

    ./mkbqnkeyboard.bqn -i /path/to/mlochbaum/BQN/editors/inputrc /path/to/lib/keyboard
    

    If you omit -i, the modified keyboard file will be printed to stdout instead of written to the file. If you add -s, the result will be sorted by (resulting) codepoint.

  3. If you're using plan9port, you'll need to

    1. Apply latin1-increase-compose-capacity.patch since the default compose sequence lookup table is too small to hold all the mappings BQN adds.
    2. Recompile plan9port.

    Other Plan 9 variants may also require extra steps.

  4. The compose sequences should now work in the acme and sam text editors as well as all other Plan 9 programs.