aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2023-10-14 15:15:13 +0800
committerGuangxiong Lin <[email protected]>2023-10-14 15:15:13 +0800
commitbf92224886c4b3a4d9e1e3b1417977034be83635 (patch)
treed82f61239452dac0a0a81481e7dcd359ae70fab5 /scripts
parenta363a4fe1e11c91d471cc96adfe2d3e5f6e8aa6e (diff)
downloaddotfiles-bf92224886c4b3a4d9e1e3b1417977034be83635.tar.gz
dotfiles-bf92224886c4b3a4d9e1e3b1417977034be83635.tar.bz2
dotfiles-bf92224886c4b3a4d9e1e3b1417977034be83635.zip
Add rime init script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/init-rime.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/init-rime.sh b/scripts/init-rime.sh
new file mode 100755
index 0000000..22228f5
--- /dev/null
+++ b/scripts/init-rime.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+set -e
+
+rime_dir=
+case "$OSTYPE" in
+ linux*)
+ export rime_frontend=fcitx5-rime
+ rime_dir="$HOME/.local/share/fcitx5/rime"
+ ;;
+ darwin*)
+ rime_dir="$HOME/Library/Rime"
+ ;;
+esac
+
+
+mkdir -p "$rime_dir"
+
+plum_dir="$rime_dir/plum"
+[ ! -d "$plum_dir" ] && git clone --depth 1 https://github.com/rime/plum.git "$plum_dir"
+
+prog="$plum_dir/rime-install"
+
+bash "$prog" \
+ prelude \
+ essay \
+ luna-pinyin \
+ emoji \
+ emoji:customize:schema=luna_pinyin \
+ emoji:customize:schema=luna_pinyin_simp