Lutzifer / keyboardSwitcher

List, show and switch OSX Keyboard Layouts from the command line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

keyboardSwitcher

keyboardSwitcher is a command-line tool designed for macOS that allows you to list, show, and switch between different keyboard layouts effortlessly.

Available Commands

  • list: List all available keyboard layouts.
  • enabled: List enabled layouts (those configured in System Preferences).
  • select "<layout>: Set the current keyboard layout.
  • get: Retrieve the currently active keyboard layout.
  • version: Print the version of keyboardSwitcher.

Limitations

To successfully execute the "select" command, the desired keyboard layout must be added in the macOS Settings app under Keyboard > Sources.

Possible Usages

Many users find keyboardSwitcher beneficial in conjunction with third-party tools such as KeyboardMaestro or via Alfred workflows. For example, you can dynamically switch the keyboard layout based on the connection status of a Bluetooth keyboard or use an Alfred workflow for quick layout changes.

Installation

Using Homebrew:

brew install lutzifer/homebrew-tap/keyboardSwitcher

Using Mint:

mint install lutzifer/keyboardSwitcher

Use with Alfred

Download the Alfred workflow from the releases page and use commands like "eng" and "ger" to swiftly change the keyboard layout.

Examples

List Available Layouts

keyboardSwitcher list

Output:

Available Layouts:
  	2-Set Korean
  	3-Set Korean
  	390 Sebulshik
  	Afghan Dari
  	Afghan Pashto
  	Afghan Uzbek
  	Anjal
    (…)

List Enabled Layouts

keyboardSwitcher enabled

Output:

Enabled Layouts:
        Colemak
        Turkish - QWERTY PC
        U.S.

Set and Get Current Layout

keyboardSwitcher select "German"
keyboardSwitcher get

Output:

German
keyboardSwitcher select "U.S."
keyboardSwitcher get

Output:

U.S.

Feel free to explore the various commands to manage your keyboard layouts efficiently.

About

List, show and switch OSX Keyboard Layouts from the command line.


Languages

Language:Swift 99.4%Language:Shell 0.6%