https://github.com/ncfavier/agda-compose
An XCompose file for Agda's Unicode input.
https://github.com/ncfavier/agda-compose
Last synced: 12 days ago
JSON representation
An XCompose file for Agda's Unicode input.
- Host: GitHub
- URL: https://github.com/ncfavier/agda-compose
- Owner: ncfavier
- License: agpl-3.0
- Created: 2025-12-10T17:57:51.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-10T19:01:25.000Z (6 months ago)
- Last Synced: 2025-12-11T04:56:25.606Z (6 months ago)
- Language: Nix
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
An [XCompose](https://linux.die.net/man/3/xcompose) file for [Agda's Unicode input](https://agda.readthedocs.io/en/latest/tools/emacs-mode.html#unicode-input).
```shell-session
$ nix build github:ncfavier/agda-compose#agda-compose -o ~/.XCompose
```
Every input sequence is prefixed with Compose\\.
This is generated from [agda-symbols](https://github.com/4e554c4c/agda-symbols) using jq and json2compose (see below).
## json2compose
A small Rust program that converts a JSON object to a Compose file.
The input JSON is read on standard input and has two fields:
- `keysyms` defines custom character-to-keysym mappings, as an extension of the
standard mapping defined by `utf32_to_keysym`. Use non-typable characters to avoid collisions.
- `entries` maps input strings (sequences of characters interpreted as keysyms via
the previous field and `utf32_to_keysym`) to output strings.
**Example**:
```shell-session
$ nix run github:ncfavier/agda-compose#json2compose <<'EOF'
{
"keysyms": {
"⋆": "Multi_key",
"→": "Right"
},
"entries": {
"⋆→": "→",
"⋆==": "≡",
"⋆shrug": "¯\\_(ツ)_/¯"
}
}
EOF
: "≡"
: "¯\\_(ツ)_/¯"
: "→"
```