Determine OS X keyboard layout (“input source”) in the terminal/a script?

后端 未结 6 1383
感情败类
感情败类 2020-12-23 15:25

I would like to determine the OS X keyboard layout (or \"input source\" as OS X calls it) from the terminal so that I can show it in places like the tmux status bar.

6条回答
  •  天涯浪人
    2020-12-23 15:53

    This question led to the creation of the keyboardSwitcher CLI Tool: https://github.com/Lutzifer/keyboardSwitcher

    Though similar to the already mentioned https://github.com/myshov/xkbswitch-macosx this has additional features, e.g. the list of Layouts is not hardcoded and thus can also support third party layouts (e.g. Logitech) and supports installation via homebrew.

提交回复
热议问题