lwhsu / tmux-rime

[WIP] Rime in Tmux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tmux-Rime

logo.png

Description

tmux-rime is a tmux plugin that let you type CJK chars within terminal.

You may refer to the introduction slide: slide/presentation.pdf

Program Structure

structure.png

Screenshot

screenshot.png

Installation

Prerequisite

FreeBSD

Install required packages:

pkg install git gcc gmake bash tmux zh-librime zh-fcitx-rime

You may need to create a symobol link called python to link to python3.X

mkdir ~/bin
ln -s /usr/local/bin/python3.8 ~/bin/python

Create a empty directory /usr/share/rime-data (I know it’s a bad practice in FreeBSD), and put all your rime configs into /.config/tmux_rime/rime/.

You may also copy the default configs (under /usr/local/share/rime-data):

sudo touch /usr/share/rime-data
mkdir -p ~/.config/tmux_rime
cp -r /usr/local/share/rime-data ~/.config/tmux_rime/rime

Building

Clone the repo and build it:

mkdir -p ~/.tmux/plugins/
git clone https://github.com/Cycatz/tmux-rime.git ~/.tmux/plugins/tmux-rime
cd ~/.tmux/plugins/tmux-rime
./build.sh

Add the following line to your tmux config, e.g., ~/.tmux.conf~:

run-shell '~/.tmux/plugins/tmux-rime/tmux_rime.tmux'

Usage

  • Prefix + t to enable the rime mode
  • Enter to commit raw characters
  • Esc to exit the rime mode

Todo

IME functions

  • Preedit chars deleting
  • Raw input committing
  • Candidate selection
  • Schema selection

Customization

  • Custom IME status bar
  • Custom plugin options
    • Use tmux user options (prefixed with @) to define variables
  • Custom key mappings
    • Define what keys need to be bound in tmux

Misc

  • Write tests
  • Write documentation
  • Set up plugin installation process

About

[WIP] Rime in Tmux


Languages

Language:Python 61.0%Language:C 20.4%Language:Shell 17.6%Language:Makefile 1.1%