Fetch libmonet in build.sh and document monet colours
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5bea01e224
commit
99fe8f589f
2 files changed
+12
-1
No files matched your search
@@ -47,7 +47,7 @@ sudo dnf install fcitx5-devel extra-cmake-modules cairo-devel pango-devel \
|
||||
然后:
|
||||
|
||||
```
|
||||
scripts/build.sh # 下载 Fcitx5 和 yoga 源码,叠加 src/,构建 m3ui
|
||||
scripts/build.sh # 下载 Fcitx5、yoga 和 libmonet 源码,叠加 src/,构建 m3ui
|
||||
scripts/install.sh # 安装到 ~/.local,不改动 $HOME 以外的任何东西
|
||||
```
|
||||
|
||||
@@ -56,6 +56,12 @@ scripts/install.sh # 安装到 ~/.local,不改动 $HOME 以外的任何东西
|
||||
没有固定提交的版本会被拒绝,除非你自己用 `FCITX_COMMIT=<sha>` 指定。这个插件跑在输入法进程里,
|
||||
看得到你打的所有字,所以构建来源值得认真对待。
|
||||
|
||||
## 莫奈取色
|
||||
|
||||
候选窗的颜色由 [libmonet](https://git.oeo.one/justme/libmonet) 从桌面强调色生成(`UseMonet=True`,默认开),
|
||||
深浅色跟随系统。输入法进程内不会启动任何子进程:直接复用 Fcitx5 自己监听的 XDG portal
|
||||
(KDE Plasma 6、GNOME 47+ 都有),取不到时回退到默认的粉色。`UseMonet=False` 回到主题文件里的固定颜色。
|
||||
|
||||
## 使用
|
||||
|
||||
手动试用:
|
||||
|
||||
@@ -27,6 +27,8 @@ commit=${FCITX_COMMIT:-${known_commits[$version]:-}}
|
||||
[ -n "$commit" ] || die "no pinned commit for Fcitx5 $version. Look up the commit of its tag and pass it as FCITX_COMMIT=<sha>"
|
||||
# Commit of the yoga submodule pinned by Fcitx5 (third_party/yoga).
|
||||
yoga_commit=${YOGA_COMMIT:-042f5013152eb81c1552dec945b88f7b95ca350f}
|
||||
# libmonet (header-only) supplies the colours derived from the desktop accent.
|
||||
monet_commit=${MONET_COMMIT:-b97a55ac75ae82435628dc585cccadb45e4d2feb}
|
||||
|
||||
# fetch_commit <url> <dir> <commit>, leaves <dir> checked out at exactly <commit>
|
||||
fetch_commit() {
|
||||
@@ -48,6 +50,8 @@ echo ">> fetching Fcitx5 $version ($commit)"
|
||||
fetch_commit https://github.com/fcitx/fcitx5 "$srcdir" "$commit"
|
||||
echo ">> fetching yoga ($yoga_commit)"
|
||||
fetch_commit https://github.com/facebook/yoga "$srcdir/third_party/yoga" "$yoga_commit"
|
||||
echo ">> fetching libmonet ($monet_commit)"
|
||||
fetch_commit https://git.oeo.one/justme/libmonet.git "$work/libmonet" "$monet_commit"
|
||||
[ -z "${FETCH_ONLY:-}" ] || { echo ">> sources are in place"; exit 0; }
|
||||
|
||||
echo ">> overlaying m3ui"
|
||||
@@ -61,6 +65,7 @@ fi
|
||||
echo ">> configuring"
|
||||
cmake -S "$srcdir" -B "$work/cmake" -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DMONET_INCLUDE_DIR="$work/libmonet/include" \
|
||||
-DCMAKE_INSTALL_PREFIX="${PREFIX:-$HOME/.local/m3ui}" \
|
||||
-DENABLE_X11=On -DENABLE_WAYLAND=On \
|
||||
-DENABLE_TEST=Off -DENABLE_TESTING_ADDONS=Off -DENABLE_ENCHANT=Off \
|
||||
|
||||
Reference in new issue
Block a user