linux/autozhuyin_ibus.py is an IBus engine on top of the shared Python core: preedit with the cursor and blue English segments, lookup table, Shift tap for English mode, candidate clicks. install.sh puts everything in the home folder (works on read-only systems) and an autostart entry registers the engine with ibus-daemon and selects it. Tested with a stand-in IBus module. Also fixes Windows: wants() did not claim the backtick, so backtick + punctuation never reached the engine under PIME. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
653 B
Bash
Executable File
15 lines
653 B
Bash
Executable File
#!/bin/bash
|
|
# Removes AutoZhuyin (自動注音) for the current user. Your learned corrections and
|
|
# user phrases in ~/.config/autozhuyin are kept (delete that folder to remove them).
|
|
set -uo pipefail
|
|
|
|
DEST="${XDG_DATA_HOME:-$HOME/.local/share}/autozhuyin"
|
|
AUTOSTART="${XDG_CONFIG_HOME:-$HOME/.config}/autostart/autozhuyin.desktop"
|
|
|
|
if command -v ibus >/dev/null 2>&1 && [ "$(ibus engine 2>/dev/null)" = "autozhuyin" ]; then
|
|
ibus engine xkb:us::eng 2>/dev/null
|
|
fi
|
|
pkill -f "autozhuyin/autozhuyin_ibus.py" 2>/dev/null
|
|
rm -rf "$DEST" "$AUTOSTART"
|
|
echo "已移除自動注音。學習紀錄留在 ~/.config/autozhuyin,不需要可以自行刪除。"
|