#!/bin/bash
# 微信输入板 - native Silica text input + clipboard bridge
# (WeChat 的 Qt 走 wayland text-input，若系统 maliit 不兼容时用它输入再粘贴)
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/100000}
if [ -z "$WAYLAND_DISPLAY" ]; then
  if [ -S /run/display/wayland-0 ]; then
    export WAYLAND_DISPLAY=/run/display/wayland-0
  else
    export WAYLAND_DISPLAY=../../display/wayland-0
  fi
fi
export QT_IM_MODULE=Maliit
exec qmlscene /usr/share/wechat-inputboard/input.qml "$@"
