Skip to content

Instantly share code, notes, and snippets.

@VincentSit
Created April 3, 2023 14:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VincentSit/a682f4162b998c7f24d08ab34bf233da to your computer and use it in GitHub Desktop.
Save VincentSit/a682f4162b998c7f24d08ab34bf233da to your computer and use it in GitHub Desktop.
Uninstall WeType for macOS / 卸载 macOS 微信键盘
#!/bin/sh
INPUT_METHODS_DIR="/Library/Input Methods"
WETYPE_INSTALL_PATH="$INPUT_METHODS_DIR/WeType.app"
WXKB_INSTALL_PATH="$INPUT_METHODS_DIR/wxkbmac.app"
CUR_DIR=$(cd "$(dirname "$0")"; pwd)
echo "$(date +%H:%M:%S) kill WeType"
killall wxkbmac
#killall WeTypeFeedback
#killall WeType
echo "$(date +%H:%M:%S) remove packages"
if [ -d "$WXKB_INSTALL_PATH" ]; then
echo "$(date +%H:%M:%S) remove wxkbmac package"
rm -rf "$WXKB_INSTALL_PATH"
fi
if [ -d "$WETYPE_INSTALL_PATH" ]; then
echo "$(date +%H:%M:%S) remove WeType package"
rm -rf "$WETYPE_INSTALL_PATH"
fi
stillRunning=$(ps -ef | grep "System Preferences" | grep -v "grep")
if [ "$stillRunning" ] ; then
killall System\ Preferences
fi
killall SystemUIServer
echo "$(date +%H:%M:%S) finish"
@VincentSit
Copy link
Author

chmod +x uninstall_wetype.sh
sudo ./uninstall_wetype.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment