Files
justmeandClaude Sonnet 5.5 0804634dc1 Add Material 3 candidate window addon for Fcitx5
Fork of the classicui addon (Fcitx5 5.1.23) with a Material 3 look, spring
based animations and a right click action menu for candidates.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 21:58:54 +08:00

32 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Installs the addon, the themes and an example config into your home
# directory. Nothing outside $HOME is touched and the stock classicui stays
# available.
set -euo pipefail
root=$(cd "$(dirname "$0")/.." && pwd)
work=${WORK_DIR:-$root/build}
prefix=${PREFIX:-$HOME/.local/m3ui}
data=${XDG_DATA_HOME:-$HOME/.local/share}/fcitx5
config=${XDG_CONFIG_HOME:-$HOME/.config}/fcitx5
# Going through cmake's install step strips the build tree rpath, otherwise the
# addon would load a second copy of libFcitx5Core from the build directory.
cmake -DCMAKE_INSTALL_PREFIX="$prefix" -P "$work/cmake/src/ui/m3ui/cmake_install.cmake"
mkdir -p "$data/addon" "$data/themes" "$config/conf"
cp "$prefix/share/fcitx5/addon/m3ui.conf" "$data/addon/m3ui.conf"
cp -r "$root"/themes/* "$data/themes/"
if [ ! -e "$config/conf/m3ui.conf" ]; then
cp "$root/config/m3ui.conf.example" "$config/conf/m3ui.conf"
fi
addondir=$(dirname "$(find "$prefix" -name libm3ui.so | head -1)")
cat <<MSG
Installed. Try it with:
FCITX_ADDON_DIRS=$addondir:\$(pkg-config --variable=addondir Fcitx5Core 2>/dev/null || echo /usr/lib64/fcitx5) fcitx5 -r -u m3ui
Go back to the stock interface with: fcitx5 -r
MSG