Total Pageviews

Tuesday, 1 March 2022

fcitx-remote for OS X

A simulate fcitx-remote to handle osx input method in command line.

fcitx-remote is a tool to control fcitx state via console. Users in Linux use it for interaction with their vim or emacs to avoid being interrupted by input method.

Plugins

How this works

fcitx-remote for OS X dosen't rely on fcitx at all. It is just a small program that responds to fcitx.el etc. just like it's really a fcitx-remote in GNU/Linux.

You can choose your Chinese input method and English layout(or others) in compilation.

Settings

There are two modes:

  1. GENERAL mode: use keystroke Ctrl-Shift-Z to switch input method, see instructions below.
  2. SPECIFIC mode: switch to specific input method by name. Builtin support is included for:
    1. Baidu Pinyin
    2. Baidu Wubi
    3. Log Input
    4. Log Input 2
    5. OS X Pinyin
    6. OS X Shuangpin
    7. OS X Wubi
    8. Qingg
    9. QQ Wubi
    10. Sogou Pinyin
    11. Squirrel Rime(old verison)
    12. Squirrel Rime

Installation

git clone https://github.com/xcodebuild/fcitx-remote-for-osx.git
cd fcitx-remote-for-osx
./build.py build all
# general method
cp ./fcitx-remote-general /usr/local/bin/fcitx-remote
# squirrel for example
cp ./fcitx-remote-squirrel-rime-upstream /usr/local/bin/fcitx-remote

Installation via homebrew (obsolete)

brew install fcitx-remote-for-osx

System Settings for methods other than general

None.

System Settings for GENERAL method only

Set your shortcut for Select next source in input menu to Ctrl-Shift-z.

preview

And set your English input method to US(美式英语)

preview

Enjoy!


from https://github.com/xcodebuild/fcitx-remote-for-osx

-----


homebrew-fcitx-remote-for-osx

brew tap for https://github.com/CodeFalling/fcitx-remote-for-osx

Usage

brew tap codefalling/fcitx-remote-for-osx
brew install codefalling/fcitx-remote-for-osx/fcitx-remote-for-osx --with-baidu-pinyin

You can use brew info codefalling/fcitx-remote-for-osx/fcitx-remote-for-osx to get input method support info.


from https://github.com/xcodebuild/homebrew-fcitx-remote-for-osx

使用 xcode-install 来管理 Xcode的版本

我们都知道,在使用 Python 的时候有 pyenv,使用 ruby 的话有 rbenv,都能方便地控制和管理编程语言环境的版本,那么,有没有什么方法,能让 Xcode 也像这样切换版本呢?

每次 Xcode 发布更新,更还是不更成了一个问题,下载难,还不能断点续传,又不能用第三方工具下载,真的是非常要命……就更别提多个版本时候的兼容问题了。

使用 xcode-install,一次性解决这些问题,耶!

它是一个专门用来管理 Xcode 版本的工具,可以一键切换不同版本的 Xcode,在你的 Mac 上安装多个版本的 Xcode,非常方便。

首先,使用命令安装它: gem install xcode-install ,

然后是更新可用版本列表: xcversion update ,不过由于是要从苹果开发者网站拉取所有可用版本列表,所以需要你的开发者登录账号和密码,这些会保存在本地 iCloud 钥匙串当中,不用担心。

输入后你很有可能会遇到如下报错:

这是由于你当前已经安装了 Xcode 导致的,这阻止了 xcode-install 创建链接,所以,根据你当前安装的 Xcode 版本,将现在已经安装的版本改名,比如我现在安装的版本是最新的 11.5,那么就把 Xcode.app 改名为 Xcode-11.5.app ,然后再重试即可。

更新列表后就可以根据列表中的版本号进行安装了,你可以看到,在版本列表中,11.5 的版本已经安装:

就使用命令 xcversion select 11.5 让当前 Xcode 生效。

使用 xcversion selected 来验证:

现在 xcode-install 已经能正确识别我们原本安装且正在使用的 Xcode 版本了。

注意如果版本号里包含空格,比如测试版,那么需要用单引号将版本号括起来,使用命令安装另一个版本的 Xcode:

下载过程中经常容易断,但是没关系,你可以重新运行安装命令,它是有缓存的,所以能够断点续传,对于网络质量不好的朋友来说,确实令人欣慰。