update readme
This commit is contained in:
22
README.md
22
README.md
@@ -1,6 +1,6 @@
|
|||||||
# strans
|
# strans
|
||||||
|
|
||||||
An input method daemon for CJK text entry on X11.
|
An input method daemon for CJK text entry on X11 and Wayland.
|
||||||
|
|
||||||
Inspired by 9front's ktrans. Threads communicate via CSP channels.
|
Inspired by 9front's ktrans. Threads communicate via CSP channels.
|
||||||
|
|
||||||
@@ -8,6 +8,7 @@ Inspired by 9front's ktrans. Threads communicate via CSP channels.
|
|||||||
|
|
||||||
- plan9port
|
- plan9port
|
||||||
- dbus-1
|
- dbus-1
|
||||||
|
- wayland-client, libxkbcommon (for Wayland support)
|
||||||
- gtk+-3.0 (optional, for GTK IM module)
|
- gtk+-3.0 (optional, for GTK IM module)
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
@@ -33,7 +34,12 @@ For IBus apps (kitty, foot, etc.):
|
|||||||
|
|
||||||
GLFW_IM_MODULE=ibus kitty
|
GLFW_IM_MODULE=ibus kitty
|
||||||
|
|
||||||
Strans itself is the IBus endpoint; no ibus-daemon or fcitx5 needed.
|
For Wayland apps (text-input-v3 clients on wlroots compositors):
|
||||||
|
|
||||||
|
# nothing to set; the compositor relays text-input-v3 to strans
|
||||||
|
|
||||||
|
Strans itself is the IBus endpoint and the Wayland input-method-v2 client;
|
||||||
|
no ibus-daemon or fcitx5 needed. Start strans after the compositor.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -51,13 +57,14 @@ Tab or Enter to commit.
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
Four threads communicate via CSP channels:
|
Threads communicate via CSP channels:
|
||||||
|
|
||||||
- [imthread](strans.c#L271): keystroke processing, transliteration
|
- [imthread](strans.c#L271): keystroke processing, transliteration
|
||||||
- [dictthread](dict.c#L38): dictionary lookup
|
- [dictthread](dict.c#L38): dictionary lookup
|
||||||
- [drawthread](win.c#L133): preedit window rendering
|
- [drawthread](win.c#L133): preedit window rendering
|
||||||
- [srvthread](srv.c#L42): IPC via unix socket
|
- [srvthread](srv.c#L42): IPC via unix socket
|
||||||
- [ibusthread](ibus.c): IBus D-Bus endpoint for GLFW/kitty
|
- [ibusthread](ibus.c): IBus D-Bus endpoint for GLFW/kitty
|
||||||
|
- [waylandthread](wayland.c): Wayland input-method-v2 + virtual-keyboard-v1
|
||||||
|
|
||||||
Adapters (strans-xim, im-strans.so) bridge X11/GTK events.
|
Adapters (strans-xim, im-strans.so) bridge X11/GTK events.
|
||||||
|
|
||||||
@@ -67,9 +74,18 @@ Adapters (strans-xim, im-strans.so) bridge X11/GTK events.
|
|||||||
dict.c dictionary queries
|
dict.c dictionary queries
|
||||||
win.c xcb window management
|
win.c xcb window management
|
||||||
font.c truetype rendering (stb_truetype)
|
font.c truetype rendering (stb_truetype)
|
||||||
|
wayland.c wayland input-method-v2 adapter
|
||||||
map/ transliteration tables
|
map/ transliteration tables
|
||||||
font/ bundled CJK fonts
|
font/ bundled CJK fonts
|
||||||
|
|
||||||
|
input-method-unstable-v2-*.{c,h} wayland-scanner output, vendored
|
||||||
|
virtual-keyboard-unstable-v1-*.{c,h}
|
||||||
|
|
||||||
|
The two Wayland protocols (input-method-v2, virtual-keyboard-v1) are
|
||||||
|
wlroots-only and not in the upstream wayland-protocols package, so the
|
||||||
|
generated client code is vendored. Regenerate with wayland-scanner if
|
||||||
|
the XML upstream ever changes (it hasn't in years).
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
- https://git.9front.org/plan9front/plan9front/HEAD/info.html
|
- https://git.9front.org/plan9front/plan9front/HEAD/info.html
|
||||||
|
|||||||
Reference in New Issue
Block a user