#!/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 </dev/null || echo /usr/lib64/fcitx5) fcitx5 -r -u m3ui Go back to the stock interface with: fcitx5 -r MSG