A TUI App for Rime.
Usage: rime-tui [OPTIONS] Options: -s, --schema <schema> --shared-dir <shared-dir> Rime shared data directory [default: /usr/share/rime-data/] --user-dir <user-dir> Rime user data directory [default: /home/bczhc/.local/share/fcitx5/rime] --exit-command <exit-command> Input command for exiting the program [default: /exit] --copy-command <copy-command> Input command for putting the output into X11 clipboard [default: /copy] --load-command <load-command> Input command for loading from X11 clipboard [default: /load] -h, --help Print help
Currently, this program only runs on *nix operating systems, with X11 graphics environment. The reason writes below:
Pure terminal has no way to listen key down events (say, raw key events), and for this program key listening is achieved via X11 APIs. This means an active X11 server is also needed.
Seems librime doesn't provide a way to redirect
its log outputs, so I use "file descriptor duplication"
(Rust gag
crate)
and pipe(2)
to intercept stderr, printing
its content inside the TUI App "Output" area. These APIs
only exist on *nix platforms.